提交 53176e39 作者: chaining

增加忽略文件

父级 bcbb26a2
/target/
/.settings/
/.idea/
/.classpath
/.project
.DS_Store
~/
/logs/
/wios.iml
# 默认忽略的文件
/shelf/
/workspace.xml
# 基于编辑器的 HTTP 客户端请求
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="nbd-wios-manage" />
</profile>
</annotationProcessing>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="central" />
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public" />
</remote-repository>
<remote-repository>
<option name="id" value="cams-releases" />
<option name="name" value="cams-releases" />
<option name="url" value="https://packages.aliyun.com/maven/repository/2105436-release-W8f7J2/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="rdc-snapshots" />
<option name="name" value="rdc-snapshots" />
<option name="url" value="https://repo.rdc.aliyun.com/repository/42378-snapshot-SzMM2B/" />
</remote-repository>
<remote-repository>
<option name="id" value="snapshots" />
<option name="name" value="snapshots" />
<option name="url" value="https://maven.aliyun.com/nexus/content/groups/public" />
</remote-repository>
<remote-repository>
<option name="id" value="cams-snapshots" />
<option name="name" value="cams-snapshots" />
<option name="url" value="https://packages.aliyun.com/maven/repository/2105436-snapshot-QhOZhi/" />
</remote-repository>
<remote-repository>
<option name="id" value="rdc-releases" />
<option name="name" value="rdc-releases" />
<option name="url" value="https://repo.rdc.aliyun.com/repository/42378-release-YWUwgn/" />
</remote-repository>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="18" project-jdk-type="JavaSDK" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/warehouse.iml" filepath="$PROJECT_DIR$/.idea/warehouse.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="" vcs="Git" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" id="Definitions_16vm19o" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0">
<bpmn:process id="CamsOrder" name="开迈斯订单" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" name="开始">
<bpmn:outgoing>SequenceFlow_0xn06bc</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id="SequenceFlow_0ybi87h" sourceRef="Task_101" targetRef="Task_102" />
<bpmn:sequenceFlow id="SequenceFlow_1r4xvy4" sourceRef="Task_102" targetRef="Task_103" />
<bpmn:sequenceFlow id="SequenceFlow_1o9uk6m" sourceRef="Task_106" targetRef="Task_107" />
<bpmn:exclusiveGateway id="ExclusiveGateway_12wtp08">
<bpmn:incoming>SequenceFlow_1cisklp</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1sgp44n</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0xmvi2s</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:endEvent id="EndEvent_0s0yi3p" name="结束">
<bpmn:incoming>SequenceFlow_0185w85</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0jrlgiu</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1a4vlve</bpmn:incoming>
</bpmn:endEvent>
<bpmn:exclusiveGateway id="ExclusiveGateway_0k3nvbs">
<bpmn:incoming>SequenceFlow_113x101</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0zcybf5</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1458g0h</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0jrlgiu</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0thd0mn</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_113x101" sourceRef="Task_112" targetRef="ExclusiveGateway_0k3nvbs" />
<bpmn:sequenceFlow id="SequenceFlow_0zcybf5" name="通过" sourceRef="ExclusiveGateway_0k3nvbs" targetRef="Task_113">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==113}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1dgoqbl" sourceRef="Task_110" targetRef="Task_111" />
<bpmn:exclusiveGateway id="ExclusiveGateway_0sfghw7">
<bpmn:incoming>SequenceFlow_0alwfnd</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1sp03zh</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1mp13yt</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_0alwfnd" sourceRef="Task_107" targetRef="ExclusiveGateway_0sfghw7" />
<bpmn:sequenceFlow id="SequenceFlow_1sp03zh" name="通过" sourceRef="ExclusiveGateway_0sfghw7" targetRef="Task_108">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==108}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="ExclusiveGateway_11leg76">
<bpmn:incoming>SequenceFlow_14du1mg</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0yn6vy9</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1y5v7bn</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_14du1mg" sourceRef="Task_109" targetRef="ExclusiveGateway_11leg76" />
<bpmn:sequenceFlow id="SequenceFlow_0yn6vy9" name="通过" sourceRef="ExclusiveGateway_11leg76" targetRef="Task_110">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==110}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1sgp44n" name="变更" sourceRef="ExclusiveGateway_12wtp08" targetRef="Task_109">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==109}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0xmvi2s" name="不变更" sourceRef="ExclusiveGateway_12wtp08" targetRef="Task_110">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==110}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:userTask id="Task_101" name="101-首联">
<bpmn:incoming>SequenceFlow_0xn06bc</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0ybi87h</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_102" name="102-待派单">
<bpmn:incoming>SequenceFlow_0ybi87h</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0cp3xim</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1r4xvy4</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_103" name="103-接单">
<bpmn:incoming>SequenceFlow_1r4xvy4</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_10o0pu0</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_104" name="104-勘测预约">
<bpmn:incoming>SequenceFlow_03nm7s3</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0ufdat0</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_07zl7xj</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_105" name="105-待勘测">
<bpmn:incoming>SequenceFlow_0a9p3ot</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0ihnib3</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_106" name="106-待勘测资料上传">
<bpmn:incoming>SequenceFlow_1mp13yt</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0bmxfkg</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1o9uk6m</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_107" name="107-勘测资料审核">
<bpmn:incoming>SequenceFlow_1o9uk6m</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0alwfnd</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_108" name="108-预约安装">
<bpmn:incoming>SequenceFlow_1sp03zh</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1y5v7bn</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1cisklp</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_109" name="109-安装预约变更">
<bpmn:incoming>SequenceFlow_1sgp44n</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_14du1mg</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_110" name="110-待安装">
<bpmn:incoming>SequenceFlow_0yn6vy9</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0xmvi2s</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1dgoqbl</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_111" name="111-待安装资料上传">
<bpmn:incoming>SequenceFlow_1dgoqbl</bpmn:incoming>
<bpmn:incoming>SequenceFlow_1458g0h</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0bk3kjm</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_112" name="112-安装资料审核">
<bpmn:incoming>SequenceFlow_0bk3kjm</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_113x101</bpmn:outgoing>
</bpmn:userTask>
<bpmn:exclusiveGateway id="ExclusiveGateway_1w5zc2g">
<bpmn:incoming>SequenceFlow_10o0pu0</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_03nm7s3</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0cp3xim</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_10o0pu0" sourceRef="Task_103" targetRef="ExclusiveGateway_1w5zc2g" />
<bpmn:sequenceFlow id="SequenceFlow_03nm7s3" sourceRef="ExclusiveGateway_1w5zc2g" targetRef="Task_104">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==104}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0cp3xim" sourceRef="ExclusiveGateway_1w5zc2g" targetRef="Task_102">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==102}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1mp13yt" name="不通过" sourceRef="ExclusiveGateway_0sfghw7" targetRef="Task_106">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==106}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1cisklp" sourceRef="Task_108" targetRef="ExclusiveGateway_12wtp08" />
<bpmn:sequenceFlow id="SequenceFlow_1y5v7bn" name="不通过" sourceRef="ExclusiveGateway_11leg76" targetRef="Task_108">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==108}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:userTask id="Task_113" name="113-上传开票系统">
<bpmn:incoming>SequenceFlow_0zcybf5</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0pmh3yx</bpmn:outgoing>
</bpmn:userTask>
<bpmn:userTask id="Task_114" name="114-更新结算状态">
<bpmn:incoming>SequenceFlow_0thd0mn</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0pph6ij</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0185w85</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="SequenceFlow_0185w85" sourceRef="Task_114" targetRef="EndEvent_0s0yi3p" />
<bpmn:sequenceFlow id="SequenceFlow_1458g0h" name="不通过" sourceRef="ExclusiveGateway_0k3nvbs" targetRef="Task_111">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==111}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="ExclusiveGateway_0eqlr92">
<bpmn:incoming>SequenceFlow_07zl7xj</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_1dts4ho</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0a9p3ot</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_07zl7xj" sourceRef="Task_104" targetRef="ExclusiveGateway_0eqlr92" />
<bpmn:sequenceFlow id="SequenceFlow_1dts4ho" sourceRef="ExclusiveGateway_0eqlr92" targetRef="Task_115">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==115}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:userTask id="Task_115" name="115-电力报装">
<bpmn:incoming>SequenceFlow_1dts4ho</bpmn:incoming>
<bpmn:incoming>SequenceFlow_0tc5zen</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0ufdat0</bpmn:outgoing>
</bpmn:userTask>
<bpmn:sequenceFlow id="SequenceFlow_0a9p3ot" sourceRef="ExclusiveGateway_0eqlr92" targetRef="Task_105">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==105}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="ExclusiveGateway_0ahwbns">
<bpmn:incoming>SequenceFlow_0ihnib3</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0bmxfkg</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_0tc5zen</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_0ihnib3" sourceRef="Task_105" targetRef="ExclusiveGateway_0ahwbns" />
<bpmn:sequenceFlow id="SequenceFlow_0bmxfkg" sourceRef="ExclusiveGateway_0ahwbns" targetRef="Task_106">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==106}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0tc5zen" sourceRef="ExclusiveGateway_0ahwbns" targetRef="Task_115">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==115}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0ufdat0" sourceRef="Task_115" targetRef="Task_104">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==104}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0xn06bc" sourceRef="StartEvent_1" targetRef="Task_101" />
<bpmn:sequenceFlow id="SequenceFlow_0bk3kjm" sourceRef="Task_111" targetRef="Task_112" />
<bpmn:sequenceFlow id="SequenceFlow_0jrlgiu" name="移桩订单直接归档" sourceRef="ExclusiveGateway_0k3nvbs" targetRef="EndEvent_0s0yi3p">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==119}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_0thd0mn" name="个人用户不上传开票系统" sourceRef="ExclusiveGateway_0k3nvbs" targetRef="Task_114">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==114}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:exclusiveGateway id="ExclusiveGateway_0zrqpv2">
<bpmn:incoming>SequenceFlow_0pmh3yx</bpmn:incoming>
<bpmn:outgoing>SequenceFlow_0pph6ij</bpmn:outgoing>
<bpmn:outgoing>SequenceFlow_1a4vlve</bpmn:outgoing>
</bpmn:exclusiveGateway>
<bpmn:sequenceFlow id="SequenceFlow_0pmh3yx" sourceRef="Task_113" targetRef="ExclusiveGateway_0zrqpv2" />
<bpmn:sequenceFlow id="SequenceFlow_0pph6ij" sourceRef="ExclusiveGateway_0zrqpv2" targetRef="Task_114">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==114}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
<bpmn:sequenceFlow id="SequenceFlow_1a4vlve" sourceRef="ExclusiveGateway_0zrqpv2" targetRef="EndEvent_0s0yi3p">
<bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${next==119}</bpmn:conditionExpression>
</bpmn:sequenceFlow>
</bpmn:process>
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="CamsOrder">
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
<dc:Bounds x="136" y="214" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="143" y="260" width="22" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_12wtp08_di" bpmnElement="ExclusiveGateway_12wtp08" isMarkerVisible="true">
<dc:Bounds x="1053" y="665" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="EndEvent_0s0yi3p_di" bpmnElement="EndEvent_0s0yi3p">
<dc:Bounds x="215" y="413" width="36" height="36" />
<bpmndi:BPMNLabel>
<dc:Bounds x="222" y="389" width="22" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0k3nvbs_di" bpmnElement="ExclusiveGateway_0k3nvbs" isMarkerVisible="true">
<dc:Bounds x="512" y="510" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0sfghw7_di" bpmnElement="ExclusiveGateway_0sfghw7" isMarkerVisible="true">
<dc:Bounds x="1267" y="510" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_11leg76_di" bpmnElement="ExclusiveGateway_11leg76" isMarkerVisible="true">
<dc:Bounds x="1053" y="406" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_17rxay5_di" bpmnElement="Task_101">
<dc:Bounds x="265" y="192" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_0lte6fu_di" bpmnElement="Task_102">
<dc:Bounds x="416" y="192" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_1osef1c_di" bpmnElement="Task_103">
<dc:Bounds x="577" y="192" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_10lkn1t_di" bpmnElement="Task_104">
<dc:Bounds x="717" y="192" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_0zhry4d_di" bpmnElement="Task_105">
<dc:Bounds x="1004" y="192" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_04crjoh_di" bpmnElement="Task_106">
<dc:Bounds x="1242" y="192" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_09w8p6l_di" bpmnElement="Task_107">
<dc:Bounds x="1242" y="370" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_0vbwu7h_di" bpmnElement="Task_108">
<dc:Bounds x="1242" y="650" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_1uh9s3l_di" bpmnElement="Task_109">
<dc:Bounds x="1028" y="495" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_0j1lo9z_di" bpmnElement="Task_110">
<dc:Bounds x="834" y="650" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_1o36nqh_di" bpmnElement="Task_111">
<dc:Bounds x="658" y="650" width="100" height="80" />
<bpmndi:BPMNLabel />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_0n5y08j_di" bpmnElement="Task_112">
<dc:Bounds x="487" y="650" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_1w5zc2g_di" bpmnElement="ExclusiveGateway_1w5zc2g" isMarkerVisible="true">
<dc:Bounds x="602" y="304" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_02pp04i_di" bpmnElement="Task_113">
<dc:Bounds x="353" y="659" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_12dami0_di" bpmnElement="Task_114">
<dc:Bounds x="183" y="659" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0eqlr92_di" bpmnElement="ExclusiveGateway_0eqlr92" isMarkerVisible="true">
<dc:Bounds x="870" y="207" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="UserTask_128eejk_di" bpmnElement="Task_115">
<dc:Bounds x="845" y="81" width="100" height="80" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0ahwbns_di" bpmnElement="ExclusiveGateway_0ahwbns" isMarkerVisible="true">
<dc:Bounds x="1029" y="96" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id="ExclusiveGateway_0zrqpv2_di" bpmnElement="ExclusiveGateway_0zrqpv2" isMarkerVisible="true">
<dc:Bounds x="378" y="790" width="50" height="50" />
</bpmndi:BPMNShape>
<bpmndi:BPMNEdge id="SequenceFlow_0ybi87h_di" bpmnElement="SequenceFlow_0ybi87h">
<di:waypoint x="365" y="232" />
<di:waypoint x="416" y="232" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1r4xvy4_di" bpmnElement="SequenceFlow_1r4xvy4">
<di:waypoint x="516" y="232" />
<di:waypoint x="577" y="232" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1o9uk6m_di" bpmnElement="SequenceFlow_1o9uk6m">
<di:waypoint x="1292" y="272" />
<di:waypoint x="1292" y="370" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_113x101_di" bpmnElement="SequenceFlow_113x101">
<di:waypoint x="537" y="650" />
<di:waypoint x="537" y="560" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0zcybf5_di" bpmnElement="SequenceFlow_0zcybf5">
<di:waypoint x="512" y="535" />
<di:waypoint x="403" y="535" />
<di:waypoint x="403" y="659" />
<bpmndi:BPMNLabel>
<dc:Bounds x="462" y="517" width="22" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1dgoqbl_di" bpmnElement="SequenceFlow_1dgoqbl">
<di:waypoint x="834" y="690" />
<di:waypoint x="758" y="690" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0alwfnd_di" bpmnElement="SequenceFlow_0alwfnd">
<di:waypoint x="1292" y="450" />
<di:waypoint x="1292" y="510" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1sp03zh_di" bpmnElement="SequenceFlow_1sp03zh">
<di:waypoint x="1292" y="560" />
<di:waypoint x="1292" y="650" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1296" y="602" width="22" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_14du1mg_di" bpmnElement="SequenceFlow_14du1mg">
<di:waypoint x="1078" y="495" />
<di:waypoint x="1078" y="456" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0yn6vy9_di" bpmnElement="SequenceFlow_0yn6vy9">
<di:waypoint x="1053" y="431" />
<di:waypoint x="884" y="431" />
<di:waypoint x="884" y="650" />
<bpmndi:BPMNLabel>
<dc:Bounds x="958" y="413" width="22" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1sgp44n_di" bpmnElement="SequenceFlow_1sgp44n">
<di:waypoint x="1078" y="665" />
<di:waypoint x="1078" y="575" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1067" y="649" width="22" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0xmvi2s_di" bpmnElement="SequenceFlow_0xmvi2s">
<di:waypoint x="1053" y="690" />
<di:waypoint x="934" y="690" />
<bpmndi:BPMNLabel>
<dc:Bounds x="978" y="672" width="33" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_10o0pu0_di" bpmnElement="SequenceFlow_10o0pu0">
<di:waypoint x="627" y="272" />
<di:waypoint x="627" y="304" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_03nm7s3_di" bpmnElement="SequenceFlow_03nm7s3">
<di:waypoint x="652" y="329" />
<di:waypoint x="767" y="329" />
<di:waypoint x="767" y="272" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0cp3xim_di" bpmnElement="SequenceFlow_0cp3xim">
<di:waypoint x="602" y="329" />
<di:waypoint x="466" y="329" />
<di:waypoint x="466" y="272" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1mp13yt_di" bpmnElement="SequenceFlow_1mp13yt">
<di:waypoint x="1317" y="535" />
<di:waypoint x="1410" y="535" />
<di:waypoint x="1410" y="232" />
<di:waypoint x="1342" y="232" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1409" y="381" width="33" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1cisklp_di" bpmnElement="SequenceFlow_1cisklp">
<di:waypoint x="1242" y="690" />
<di:waypoint x="1103" y="690" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1y5v7bn_di" bpmnElement="SequenceFlow_1y5v7bn">
<di:waypoint x="1103" y="431" />
<di:waypoint x="1139" y="431" />
<di:waypoint x="1248" y="651" />
<bpmndi:BPMNLabel>
<dc:Bounds x="1105" y="413" width="33" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0185w85_di" bpmnElement="SequenceFlow_0185w85">
<di:waypoint x="233" y="659" />
<di:waypoint x="233" y="449" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1458g0h_di" bpmnElement="SequenceFlow_1458g0h">
<di:waypoint x="562" y="535" />
<di:waypoint x="708" y="535" />
<di:waypoint x="708" y="650" />
<bpmndi:BPMNLabel>
<dc:Bounds x="619" y="517" width="33" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_07zl7xj_di" bpmnElement="SequenceFlow_07zl7xj">
<di:waypoint x="817" y="232" />
<di:waypoint x="870" y="232" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1dts4ho_di" bpmnElement="SequenceFlow_1dts4ho">
<di:waypoint x="895" y="207" />
<di:waypoint x="895" y="161" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0a9p3ot_di" bpmnElement="SequenceFlow_0a9p3ot">
<di:waypoint x="920" y="232" />
<di:waypoint x="1004" y="232" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0ihnib3_di" bpmnElement="SequenceFlow_0ihnib3">
<di:waypoint x="1054" y="192" />
<di:waypoint x="1054" y="146" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0bmxfkg_di" bpmnElement="SequenceFlow_0bmxfkg">
<di:waypoint x="1079" y="121" />
<di:waypoint x="1292" y="121" />
<di:waypoint x="1292" y="192" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0tc5zen_di" bpmnElement="SequenceFlow_0tc5zen">
<di:waypoint x="1029" y="121" />
<di:waypoint x="945" y="121" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0ufdat0_di" bpmnElement="SequenceFlow_0ufdat0">
<di:waypoint x="845" y="121" />
<di:waypoint x="767" y="121" />
<di:waypoint x="767" y="192" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0xn06bc_di" bpmnElement="SequenceFlow_0xn06bc">
<di:waypoint x="172" y="232" />
<di:waypoint x="265" y="232" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0bk3kjm_di" bpmnElement="SequenceFlow_0bk3kjm">
<di:waypoint x="658" y="690" />
<di:waypoint x="587" y="690" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0jrlgiu_di" bpmnElement="SequenceFlow_0jrlgiu">
<di:waypoint x="537" y="535" />
<di:waypoint x="537" y="431" />
<di:waypoint x="251" y="431" />
<bpmndi:BPMNLabel>
<dc:Bounds x="385" y="424" width="88" height="14" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0thd0mn_di" bpmnElement="SequenceFlow_0thd0mn">
<di:waypoint x="537" y="510" />
<di:waypoint x="537" y="477" />
<di:waypoint x="328" y="477" />
<di:waypoint x="250" y="659" />
<bpmndi:BPMNLabel>
<dc:Bounds x="394" y="459" width="77" height="27" />
</bpmndi:BPMNLabel>
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0pmh3yx_di" bpmnElement="SequenceFlow_0pmh3yx">
<di:waypoint x="403" y="739" />
<di:waypoint x="403" y="790" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_0pph6ij_di" bpmnElement="SequenceFlow_0pph6ij">
<di:waypoint x="378" y="815" />
<di:waypoint x="233" y="815" />
<di:waypoint x="233" y="739" />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id="SequenceFlow_1a4vlve_di" bpmnElement="SequenceFlow_1a4vlve">
<di:waypoint x="378" y="815" />
<di:waypoint x="116" y="815" />
<di:waypoint x="116" y="431" />
<di:waypoint x="215" y="431" />
</bpmndi:BPMNEdge>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>
<License>
<Data>
<Products>
<Product>Aspose.Total for Java</Product>
<Product>Aspose.Words for Java</Product>
</Products>
<EditionType>Enterprise</EditionType>
<SubscriptionExpiry>20991231</SubscriptionExpiry>
<LicenseExpiry>20991231</LicenseExpiry>
<SerialNumber>8bfe198c-7f0c-4ef8-8ff0-acc3237bf0d7</SerialNumber>
</Data>
<Signature>
sNLLKGMUdF0r8O1kKilWAGdgfs2BvJb/2Xp8p5iuDVfZXmhppo+d0Ran1P9TKdjV4ABwAgKXxJ3jcQTqE/2IRfqwnPf8itN8aFZlV3TJPYeD3yWE7IT55Gz6EijUpC7aKeoohTb4w2fpox58wWoF3SNp6sK6jDfiAUGEHYJ9pjU=
</Signature>
</License>
{
"groups": [
{
"name": "cams",
"type": "com.boco.nbd.wios.core.config.ConfigDicProperties",
"sourceType": "com.boco.nbd.wios.core.config.ConfigDicProperties"
},
{
"name": "sms.aliyun",
"type": "com.boco.nbd.wios.flow.sms.aliyun.properties.AliyunProperties",
"sourceType": "com.boco.nbd.wios.flow.sms.aliyun.properties.AliyunProperties"
}
],
"properties": [
{
"name": "cams.due-date",
"type": "java.util.List<com.boco.nbd.cams.core.entity.config.ConfigIntDic>",
"description": "处理时限",
"sourceType": "com.boco.nbd.wios.core.config.ConfigDicProperties"
},
{
"name": "cams.enum-number-config",
"type": "java.util.List<com.boco.nbd.cams.core.entity.config.ConfigDic>",
"description": "数值类枚举",
"sourceType": "com.boco.nbd.wios.core.config.ConfigDicProperties"
},
{
"name": "cams.enum-string-config",
"type": "java.util.List<com.boco.nbd.cams.core.entity.config.ConfigDic>",
"description": "字符值类枚举",
"sourceType": "com.boco.nbd.wios.core.config.ConfigDicProperties"
},
{
"name": "cams.name",
"type": "java.lang.String",
"sourceType": "com.boco.nbd.wios.core.config.ConfigDicProperties"
},
{
"name": "cams.report-entry",
"type": "java.util.List<com.boco.nbd.wios.core.entity.ReportEntry>",
"description": "报告配置实体",
"sourceType": "com.boco.nbd.wios.core.config.ConfigDicProperties"
},
{
"name": "cams.score-algorithm",
"type": "java.util.List<com.boco.nbd.wios.core.entity.AlgorithmDic>",
"description": "评分自动计算算法",
"sourceType": "com.boco.nbd.wios.core.config.ConfigDicProperties"
},
{
"name": "sms.aliyun.access-key-id",
"type": "java.lang.String",
"description": "accessKeyId.",
"sourceType": "com.boco.nbd.wios.flow.sms.aliyun.properties.AliyunProperties"
},
{
"name": "sms.aliyun.access-key-secret",
"type": "java.lang.String",
"description": "accessKeySecret.",
"sourceType": "com.boco.nbd.wios.flow.sms.aliyun.properties.AliyunProperties"
},
{
"name": "sms.aliyun.endpoint",
"type": "java.lang.String",
"description": "Endpoint.",
"sourceType": "com.boco.nbd.wios.flow.sms.aliyun.properties.AliyunProperties",
"defaultValue": "cn-hangzhou"
},
{
"name": "sms.aliyun.sign-name",
"type": "java.lang.String",
"description": "短信签名.",
"sourceType": "com.boco.nbd.wios.flow.sms.aliyun.properties.AliyunProperties"
},
{
"name": "sms.aliyun.templates",
"type": "java.util.Map<java.lang.String,java.lang.String>",
"description": "短信模板.",
"sourceType": "com.boco.nbd.wios.flow.sms.aliyun.properties.AliyunProperties"
}
],
"hints": []
}
\ No newline at end of file
#farme core部分会读取这部分配置信息<= 导入部分 异常 看源码发现的
# cdn:
cdn.image.url=
# db:
database=mysql
# 配置到bootstrap.yml不生效
spring.main.allow-bean-definition-overriding=false
server:
port: 30350
spring:
application:
name: nbd-wios-manage
zhname: 开迈斯WIOS服务
cloud:
nacos:
# discovery:
# server-addr: ${nacos-server-addr}
# namespace: ${nacos-server-namespace}
# config:
# server-addr: ${nacos-server-addr}
# namespace: ${nacos-server-namespace}
# shared-configs[0].data-id: constant.yml
# shared-configs[0].group: DEFAULT_GROUP
# shared-configs[0].refresh: true
# file-extension: yml #指定配置中心中对应的配置文件的格式
# enabled: true
config:
enabled: false
jta:
enabled: false
\ No newline at end of file
server:
port: 30350
spring:
application:
name: nbd-wios-manage
zhname: 开迈斯WIOS服务
cloud:
nacos:
# discovery:
# server-addr: ${nacos-server-addr}
# namespace: ${nacos-server-namespace}
# config:
# server-addr: ${nacos-server-addr}
# namespace: ${nacos-server-namespace}
# shared-configs[0].data-id: constant.yml
# shared-configs[0].group: DEFAULT_GROUP
# shared-configs[0].refresh: true
# file-extension: yml #指定配置中心中对应的配置文件的格式
# enabled: true
config:
enabled: false
jta:
enabled: false
\ No newline at end of file
server:
port: 30350
#nacos相关参数通过环境变量带入
spring:
application:
name: nbd-wios-manage
zhname: 开迈斯WIOS服务
cloud:
# nacos:
# discovery:
# server-addr: 10.12.1.17:8848
# namespace: ce18ccbc-e054-45ad-893f-ed7ebee1704b
# config:
# server-addr: 10.12.1.17:8848
# namespace: ce18ccbc-e054-45ad-893f-ed7ebee1704b
# shared-configs[0].data-id: constant.yml
# shared-configs[0].group: DEFAULT_GROUP
# shared-configs[0].refresh: true
# file-extension: yml #指定配置中心中对应的配置文件的格式
# enabled: true
# config:
# enabled: false
nacos:
config:
enabled: false
refresh-enabled: false
discovery:
enabled: false
instance-enabled: false
jta:
enabled: false
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!--
根节点:configuration,包含以下三个属性
scan:当属性设置为true时,如果配置文件发生改变,将会被重新加载,默认true
scanPeriod:设置监测配置文件是否修改的时间间隔,没有给出时间单位,默认单位毫秒,scan为true,属性生效,默认时间间隔为1分钟
debug:true,打印logback内部日志信息,实时查看logback运行状态,默认false
子节点:
contextName:设置上下文名称,默认default
property:定义变量值,存在name、value属性
timestamp:时间戳字符串,存在key、dataPattern(遵循java.txt.SimpleDataFormat格式)属性
appender:写日志组件,必要属性name、class,以下子节点详解
encoder:日志格式化
filter:过滤器
-->
<configuration>
<property name="LOG_HOME" value="./logs"></property>
<property name="HISTORY_LOG_HOME" value="${LOG_HOME}/history"></property>
<property name="LOG_PATTERN"
value="%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] [%-5level] %logger{36} [%file:%line] - %msg%n"></property>
<!--console log-->
<appender name="consoleAppender" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期,%-5level:级别从左显示5个字符宽度,%t表示线程名,%msg:日志消息,%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level ${PID:-} --- [%t] %logger{50} - %msg%n</pattern>
</encoder>
</appender>
<!--info log-->
<appender name="infoAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${LOG_HOME}/log.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${HISTORY_LOG_HOME}/%d{yyyy-MM}/log-%d{yyyy-MM-dd}.%i.zip</fileNamePattern>
<maxHistory>30</maxHistory>
<maxFileSize>200MB</maxFileSize>
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<Append>false</Append>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<!--error log-->
<appender name="errorAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
<File>${LOG_HOME}/error.log</File>
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<fileNamePattern>${HISTORY_LOG_HOME}/%d{yyyy-MM}/error-%d{yyyy-MM-dd}.%i.zip</fileNamePattern>
<maxHistory>5</maxHistory>
<maxFileSize>100MB</maxFileSize>
<totalSizeCap>1GB</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${LOG_PATTERN}</pattern>
</encoder>
<Append>false</Append>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>ERROR</level>
</filter>
</appender>
<!--personalize appender start-->
<appender name="startAppender" class="ch.qos.logback.core.FileAppender">
<File>${LOG_HOME}/start.log</File>
<Append>false</Append>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>${LOG_PATTERN}</Pattern>
</layout>
<!-- <Append>false</Append>-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<appender name="schedulerJobAppender" class="ch.qos.logback.core.FileAppender">
<File>${LOG_HOME}/job.log</File>
<Append>false</Append>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>${LOG_PATTERN}</Pattern>
</layout>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<appender name="processAppender" class="ch.qos.logback.core.FileAppender">
<File>${LOG_HOME}/process.log</File>
<Append>false</Append>
<layout class="ch.qos.logback.classic.PatternLayout">
<Pattern>${LOG_PATTERN}</Pattern>
</layout>
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>INFO</level>
</filter>
</appender>
<!--personalize logger start-->
<logger name="com.boco.nbd.wios.microservice.Application" level="INFO" additivity="false">
<appender-ref ref="startAppender"/>
</logger>
<logger name="com.boco.nbd.wios.task" level="INFO" additivity="false">
<appender-ref ref="schedulerJobAppender"/>
</logger>
<logger name="com.boco.nbd.wios.flow.process" level="INFO" additivity="false">
<appender-ref ref="processAppender"/>
</logger>
<root level="INFO">
<appender-ref ref="consoleAppender"/>
<appender-ref ref="infoAppender"/>
<appender-ref ref="errorAppender"/>
</root>
</configuration>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.AccountMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Account" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="account" property="account" jdbcType="VARCHAR" />
<result column="password" property="password" jdbcType="VARCHAR" />
<result column="id_tree" property="idTree" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="phone" property="phone" jdbcType="VARCHAR" />
<result column="job_number" property="jobNumber" jdbcType="VARCHAR" />
<result column="email" property="email" jdbcType="VARCHAR" />
<result column="user_id" property="userId" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="parent_id" property="parentId" jdbcType="INTEGER" />
<result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP" />
<result column="create_account_id" property="createAccountId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
id, account, password,id_tree, name, phone, job_number, email, user_id, status, parent_id,
last_login_time, create_account_id, create_time, update_time
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from wb_account
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
select
<include refid="Base_Column_List" />
from wb_account
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
delete from wb_account
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
delete from wb_account
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Account" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
insert into wb_account (id, account, password, id_tree,
name, phone, job_number,
email, user_id, status, parent_id,
last_login_time, create_account_id, create_time,
update_time)
values (#{id,jdbcType=INTEGER}, #{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}, #{idTree,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{jobNumber,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{parentId,jdbcType=INTEGER},
#{lastLoginTime,jdbcType=TIMESTAMP}, #{createAccountId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Account"
useGeneratedKeys="true" keyProperty="id">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
insert into wb_account
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="account != null" >
account,
</if>
<if test="password != null" >
password,
</if>
<if test="idTree != null" >
id_tree,
</if>
<if test="name != null" >
name,
</if>
<if test="phone != null" >
phone,
</if>
<if test="jobNumber != null" >
job_number,
</if>
<if test="email != null" >
email,
</if>
<if test="userId != null" >
user_id,
</if>
<if test="status != null" >
status,
</if>
<if test="parentId != null" >
parent_id,
</if>
<if test="lastLoginTime != null" >
last_login_time,
</if>
<if test="createAccountId != null" >
create_account_id,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="updateTime != null" >
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="account != null" >
#{account,jdbcType=VARCHAR},
</if>
<if test="password != null" >
#{password,jdbcType=VARCHAR},
</if>
<if test="idTree != null" >
#{idTree,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="phone != null" >
#{phone,jdbcType=VARCHAR},
</if>
<if test="jobNumber != null" >
#{jobNumber,jdbcType=VARCHAR},
</if>
<if test="email != null" >
#{email,jdbcType=VARCHAR},
</if>
<if test="userId != null" >
#{userId,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="parentId != null" >
#{parentId,jdbcType=INTEGER},
</if>
<if test="lastLoginTime != null" >
#{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccountId != null" >
#{createAccountId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountCriteria" resultType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
select count(*) from wb_account
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
update wb_account
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.account != null" >
account = #{record.account,jdbcType=VARCHAR},
</if>
<if test="record.password != null" >
password = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.idTree != null" >
id_tree = #{record.idTree,jdbcType=VARCHAR},
</if>
<if test="record.name != null" >
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.phone != null" >
phone = #{record.phone,jdbcType=VARCHAR},
</if>
<if test="record.jobNumber != null" >
job_number = #{record.jobNumber,jdbcType=VARCHAR},
</if>
<if test="record.email != null" >
email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.userId != null" >
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.status != null" >
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.parentId != null" >
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if test="record.lastLoginTime != null" >
last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="record.createAccountId != null" >
create_account_id = #{record.createAccountId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null" >
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
update wb_account
set id = #{record.id,jdbcType=INTEGER},
account = #{record.account,jdbcType=VARCHAR},
password = #{record.password,jdbcType=VARCHAR},
id_tree = #{record.idTree,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
phone = #{record.phone,jdbcType=VARCHAR},
job_number = #{record.jobNumber,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
parent_id = #{record.parentId,jdbcType=INTEGER},
last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
create_account_id = #{record.createAccountId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Account" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
update wb_account
<set >
<if test="account != null" >
account = #{account,jdbcType=VARCHAR},
</if>
<if test="password != null" >
password = #{password,jdbcType=VARCHAR},
</if>
<if test="idTree != null" >
id_tree = #{idTree,jdbcType=VARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="phone != null" >
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="jobNumber != null" >
job_number = #{jobNumber,jdbcType=VARCHAR},
</if>
<if test="email != null" >
email = #{email,jdbcType=VARCHAR},
</if>
<if test="userId != null" >
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="lastLoginTime != null" >
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccountId != null" >
create_account_id = #{createAccountId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.Account" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:44:14 CST 2020.
-->
update wb_account
set account = #{account,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
id_tree = #{idTree,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
phone = #{phone,jdbcType=VARCHAR},
job_number = #{jobNumber,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
user_id = #{userId,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
parent_id = #{parentId,jdbcType=INTEGER},
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
create_account_id = #{createAccountId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</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.boco.nbd.wios.manage.mapper.def.AccountMapperEx" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Account" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 18:39:09 CST 2020.
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="account" property="account" jdbcType="VARCHAR" />
<result column="password" property="password" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="phone" property="phone" jdbcType="VARCHAR" />
<result column="job_number" property="jobNumber" jdbcType="VARCHAR" />
<result column="email" property="email" jdbcType="VARCHAR" />
<result column="user_id" property="userId" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="virtual_balance" property="virtualBalance" jdbcType="DECIMAL" />
<result column="power" property="power" jdbcType="DECIMAL" />
<result column="charge_electric" property="chargeElectric" jdbcType="DECIMAL" />
<result column="last_login_time" property="lastLoginTime" jdbcType="TIMESTAMP" />
<result column="create_account_id" property="createAccountId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 18:39:09 CST 2020.
-->
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
id, account, password, name, phone, job_number, email, user_id , status, virtual_balance, power,
charge_electric, last_login_time, create_account_id, create_time, update_time
</sql>
<select id="selectByPrimaryKeyForUpdate" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from wb_account
where id = #{id,jdbcType=INTEGER}
for update
</select>
<select id="getListForOem" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountBo"
resultType="com.boco.nbd.wios.manage.entity.bo.AccountVo">
select t.*,o.name as oemName,o.id as oemId from wb_account t
inner join t_oem o on t.id=o.wb_account_id
<where>
<if test="phone != null and account !=''">
and t.phone = #{phone}
</if>
<if test="oemId != null">
and o.id = #{oemId}
</if>
<if test="type != null">
and o.type = #{type}
</if>
</where>
</select>
<select id="selectByIds"
resultType="com.boco.nbd.wios.manage.entity.bo.Account">
select t.* from wb_account t
where t.id in
<foreach collection="ids" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
<select id="selectByParentIds"
resultType="com.boco.nbd.wios.manage.entity.bo.AccountVo">
select t.*,war.role_id as roleId,wr.name as roleName from wb_account t
left join wb_account_role war on war.account_id = t.id
left join wb_role wr on wr.id = war.role_id
where (
t.parent_id in
<foreach collection="parentIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
or
t.id in
<foreach collection="parentIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
)
<if test="account != null and account !=''">
and t.account = #{account}
</if>
<if test="name != null and name != ''">
<bind name="nameLike" value="'%' + name + '%'"/>
and t.name like #{nameLike}
</if>
</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.boco.nbd.wios.manage.mapper.def.AccountRoleMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.AccountRole" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="account_id" property="accountId" jdbcType="INTEGER" />
<result column="role_id" property="roleId" jdbcType="INTEGER" />
<result column="create_account_id" property="createAccountId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
<where>
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
id, account_id, role_id, create_account_id, create_time
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountRoleCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from wb_account_role
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByAccountId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
select
<include refid="Base_Column_List" />
from wb_account_role
where account_id = #{accountId,jdbcType=INTEGER}
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
select
<include refid="Base_Column_List" />
from wb_account_role
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
delete from wb_account_role
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountRoleCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
delete from wb_account_role
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountRole" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
insert into wb_account_role (id, account_id, role_id,
create_account_id, create_time)
values (#{id,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER},
#{createAccountId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountRole" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
insert into wb_account_role
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="accountId != null" >
account_id,
</if>
<if test="roleId != null" >
role_id,
</if>
<if test="createAccountId != null" >
create_account_id,
</if>
<if test="createTime != null" >
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="accountId != null" >
#{accountId,jdbcType=INTEGER},
</if>
<if test="roleId != null" >
#{roleId,jdbcType=INTEGER},
</if>
<if test="createAccountId != null" >
#{createAccountId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountRoleCriteria" resultType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
select count(*) from wb_account_role
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
update wb_account_role
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.accountId != null" >
account_id = #{record.accountId,jdbcType=INTEGER},
</if>
<if test="record.roleId != null" >
role_id = #{record.roleId,jdbcType=INTEGER},
</if>
<if test="record.createAccountId != null" >
create_account_id = #{record.createAccountId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
update wb_account_role
set id = #{record.id,jdbcType=INTEGER},
account_id = #{record.accountId,jdbcType=INTEGER},
role_id = #{record.roleId,jdbcType=INTEGER},
create_account_id = #{record.createAccountId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountRole" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
update wb_account_role
<set >
<if test="accountId != null" >
account_id = #{accountId,jdbcType=INTEGER},
</if>
<if test="roleId != null" >
role_id = #{roleId,jdbcType=INTEGER},
</if>
<if test="createAccountId != null" >
create_account_id = #{createAccountId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.AccountRole" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
update wb_account_role
set account_id = #{accountId,jdbcType=INTEGER},
role_id = #{roleId,jdbcType=INTEGER},
create_account_id = #{createAccountId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</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.boco.nbd.wios.manage.mapper.def.CamsAccountMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.CamsAccount">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="account_id" jdbcType="INTEGER" property="accountId" />
<result column="department_id" jdbcType="INTEGER" property="departmentId" />
<result column="region_id" jdbcType="VARCHAR" property="regionId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_account" jdbcType="INTEGER" property="createAccount" />
<result column="update_account" jdbcType="INTEGER" property="updateAccount" />
<result column="alarm_id" jdbcType="VARCHAR" property="alarmId" />
</resultMap>
<sql id="Base_Column_List">
id, account_id, department_id, region_id, status, create_time, update_time, create_account,
update_account,alarm_id
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_cams_account
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.CamsAccount">
insert into t_cams_account (id, account_id, department_id,
region_id, status, create_time,
update_time, create_account, update_account,alarm_id
)
values (#{id,jdbcType=INTEGER}, #{accountId,jdbcType=INTEGER}, #{departmentId,jdbcType=INTEGER},
#{regionId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{createAccount,jdbcType=INTEGER}, #{updateAccount,jdbcType=INTEGER},
#{alarmId,jdbcType=INTEGER}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.CamsAccount">
insert into t_cams_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="accountId != null">
account_id,
</if>
<if test="departmentId != null">
department_id,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="updateAccount != null">
update_account,
</if>
<if test="alarmId != null">
alarm_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="departmentId != null">
#{departmentId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
#{regionId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=INTEGER},
</if>
<if test="updateAccount != null">
#{updateAccount,jdbcType=INTEGER},
</if>
<if test="alarmId != null">
#{alarmId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.CamsAccount">
update t_cams_account
<set>
<if test="accountId != null">
account_id = #{accountId,jdbcType=INTEGER},
</if>
<if test="departmentId != null">
department_id = #{departmentId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=INTEGER},
</if>
<if test="updateAccount != null">
update_account = #{updateAccount,jdbcType=INTEGER},
</if>
<if test="alarmId != null">
alarm_id = #{alarmId,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.CamsAccount">
update t_cams_account
set account_id = #{accountId,jdbcType=INTEGER},
department_id = #{departmentId,jdbcType=INTEGER},
region_id = #{regionId,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=INTEGER},
update_account = #{updateAccount,jdbcType=INTEGER},
alarm_id = #{alarmId,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_cams_account
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByAccountIdAndDeptId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_cams_account
where account_id = #{accountId,jdbcType=INTEGER}
<if test="departmentId != null">
and department_id = #{departmentId,jdbcType=INTEGER}
</if>
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.CamsAccount"
resultType="com.boco.nbd.wios.manage.entity.bo.CamsAccountVo">
select t.*,role.name as roleName,
<!-- r.name as regionName, -->
d.name as deptName,a.name as userName,a.email as userEmail,
a.account as userAccount
from t_cams_account t
left join wb_account a on t.account_id=a.id
left join t_department d on t.department_id=d.id
<!-- left join t_region r on t.region_id = r.id -->
left join wb_account_role ar on ar.account_id=a.id
left join wb_role role on role.id=ar.role_id
<where>
t.status != 3
<if test="userName != null and userName != ''">
and a.name = #{userName}
</if>
<if test="account != null and account != ''">
and a.account = #{account}
</if>
<if test="roleId != null">
and ar.role_id = #{roleId}
</if>
<if test="regionId != null">
and find_in_set(#{regionId},t.region_id)
</if>
<if test="alarmId != null">
and find_in_set(#{alarmId},t.alarm_id)
</if>
</where>
order by t.create_time desc
</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.boco.nbd.wios.downloadfile.mapper.def.CptDataInfoMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.downloadfile.model.CptDataInfo" >
<id column="Id" property="id" jdbcType="VARCHAR" />
<result column="store_name" property="storeName" jdbcType="VARCHAR" />
<result column="description" property="description" jdbcType="VARCHAR" />
<result column="file_name" property="fileName" jdbcType="VARCHAR" />
<result column="file_size" property="fileSize" jdbcType="INTEGER" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="create_account" property="createAccount" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="prefix" property="prefix" jdbcType="VARCHAR" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
Id, store_name, description, file_name, file_size, status, create_account, create_time,
prefix
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfoCriteria" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from cpt_data_info
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from cpt_data_info
where Id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from cpt_data_info
where Id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfoCriteria" >
delete from cpt_data_info
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfo" >
insert into cpt_data_info (Id, store_name, description,
file_name, file_size, status,
create_account, create_time, prefix
)
values (#{id,jdbcType=VARCHAR}, #{storeName,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{fileName,jdbcType=VARCHAR}, #{fileSize,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{prefix,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfo" >
insert into cpt_data_info
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
Id,
</if>
<if test="storeName != null" >
store_name,
</if>
<if test="description != null" >
description,
</if>
<if test="fileName != null" >
file_name,
</if>
<if test="fileSize != null" >
file_size,
</if>
<if test="status != null" >
status,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="prefix != null" >
prefix,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="storeName != null" >
#{storeName,jdbcType=VARCHAR},
</if>
<if test="description != null" >
#{description,jdbcType=VARCHAR},
</if>
<if test="fileName != null" >
#{fileName,jdbcType=VARCHAR},
</if>
<if test="fileSize != null" >
#{fileSize,jdbcType=INTEGER},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="createAccount != null" >
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="prefix != null" >
#{prefix,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfoCriteria" resultType="java.lang.Integer" >
select count(*) from cpt_data_info
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update cpt_data_info
<set >
<if test="record.id != null" >
Id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.storeName != null" >
store_name = #{record.storeName,jdbcType=VARCHAR},
</if>
<if test="record.description != null" >
description = #{record.description,jdbcType=VARCHAR},
</if>
<if test="record.fileName != null" >
file_name = #{record.fileName,jdbcType=VARCHAR},
</if>
<if test="record.fileSize != null" >
file_size = #{record.fileSize,jdbcType=INTEGER},
</if>
<if test="record.status != null" >
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.createAccount != null" >
create_account = #{record.createAccount,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.prefix != null" >
prefix = #{record.prefix,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update cpt_data_info
set Id = #{record.id,jdbcType=VARCHAR},
store_name = #{record.storeName,jdbcType=VARCHAR},
description = #{record.description,jdbcType=VARCHAR},
file_name = #{record.fileName,jdbcType=VARCHAR},
file_size = #{record.fileSize,jdbcType=INTEGER},
status = #{record.status,jdbcType=INTEGER},
create_account = #{record.createAccount,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
prefix = #{record.prefix,jdbcType=VARCHAR}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfo" >
update cpt_data_info
<set >
<if test="storeName != null" >
store_name = #{storeName,jdbcType=VARCHAR},
</if>
<if test="description != null" >
description = #{description,jdbcType=VARCHAR},
</if>
<if test="fileName != null" >
file_name = #{fileName,jdbcType=VARCHAR},
</if>
<if test="fileSize != null" >
file_size = #{fileSize,jdbcType=INTEGER},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="createAccount != null" >
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="prefix != null" >
prefix = #{prefix,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataInfo" >
update cpt_data_info
set store_name = #{storeName,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
file_name = #{fileName,jdbcType=VARCHAR},
file_size = #{fileSize,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
prefix = #{prefix,jdbcType=VARCHAR}
where Id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.downloadfile.mapper.def.CptDataStoreMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.downloadfile.model.CptDataStore" >
<id column="Id" property="id" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="VARCHAR" />
<result column="path" property="path" jdbcType="VARCHAR" />
<result column="bak_path" property="bakPath" jdbcType="VARCHAR" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
Id, name, type, path, bak_path
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataStoreCriteria" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from cpt_datastore
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from cpt_datastore
where Id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from cpt_datastore
where Id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataStoreCriteria" >
delete from cpt_datastore
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataStore" >
insert into cpt_datastore (Id, name, type,
path, bak_path)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{path,jdbcType=VARCHAR}, #{bakPath,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataStore" >
insert into cpt_datastore
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
Id,
</if>
<if test="name != null" >
name,
</if>
<if test="type != null" >
type,
</if>
<if test="path != null" >
path,
</if>
<if test="bakPath != null" >
bak_path,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=VARCHAR},
</if>
<if test="path != null" >
#{path,jdbcType=VARCHAR},
</if>
<if test="bakPath != null" >
#{bakPath,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataStoreCriteria" resultType="java.lang.Integer" >
select count(*) from cpt_datastore
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update cpt_datastore
<set >
<if test="record.id != null" >
Id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.name != null" >
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.type != null" >
type = #{record.type,jdbcType=VARCHAR},
</if>
<if test="record.path != null" >
path = #{record.path,jdbcType=VARCHAR},
</if>
<if test="record.bakPath != null" >
bak_path = #{record.bakPath,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update cpt_datastore
set Id = #{record.id,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
type = #{record.type,jdbcType=VARCHAR},
path = #{record.path,jdbcType=VARCHAR},
bak_path = #{record.bakPath,jdbcType=VARCHAR}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataStore" >
update cpt_datastore
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="type != null" >
type = #{type,jdbcType=VARCHAR},
</if>
<if test="path != null" >
path = #{path,jdbcType=VARCHAR},
</if>
<if test="bakPath != null" >
bak_path = #{bakPath,jdbcType=VARCHAR},
</if>
</set>
where Id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.downloadfile.model.CptDataStore" >
update cpt_datastore
set name = #{name,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
path = #{path,jdbcType=VARCHAR},
bak_path = #{bakPath,jdbcType=VARCHAR}
where Id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.DepartmentMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Department">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="region_id" jdbcType="INTEGER" property="regionId" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
<result column="id_tree" jdbcType="VARCHAR" property="idTree" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_account" jdbcType="INTEGER" property="createAccount" />
<result column="update_account" jdbcType="INTEGER" property="updateAccount" />
</resultMap>
<sql id="Base_Column_List">
id, name, region_id, address, parent_id, id_tree, remark, status, create_time, update_time,
create_account, update_account
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_department
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Department"
useGeneratedKeys="true" keyProperty="id">
insert into t_department (id, name, region_id,
address, parent_id, id_tree,
remark, status, create_time,
update_time, create_account, update_account
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{regionId,jdbcType=INTEGER},
#{address,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER}, #{idTree,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{createAccount,jdbcType=INTEGER}, #{updateAccount,jdbcType=INTEGER}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Department">
insert into t_department
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="address != null">
address,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="idTree != null">
id_tree,
</if>
<if test="remark != null">
remark,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="updateAccount != null">
update_account,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
#{regionId,jdbcType=INTEGER},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
#{parentId,jdbcType=INTEGER},
</if>
<if test="idTree != null">
#{idTree,jdbcType=VARCHAR},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=INTEGER},
</if>
<if test="updateAccount != null">
#{updateAccount,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Department">
update t_department
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=INTEGER},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="idTree != null">
id_tree = #{idTree,jdbcType=VARCHAR},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=INTEGER},
</if>
<if test="updateAccount != null">
update_account = #{updateAccount,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.Department">
update t_department
set name = #{name,jdbcType=VARCHAR},
region_id = #{regionId,jdbcType=INTEGER},
address = #{address,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
id_tree = #{idTree,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=INTEGER},
update_account = #{updateAccount,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_department
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectAll" parameterType="java.lang.Integer"
resultType="com.boco.nbd.wios.manage.entity.bo.DepartmentVo">
select t.*,r.name as regionName from t_department t
left join t_region r on r.id=t.region_id
<where>
<if test="status != null">
and t.status = #{status}
</if>
</where>
</select>
<update id="updateIdTree">
update t_department
set id_tree = concat(#{idTreeNewPrefix},substring(id_tree,length(#{idTreePrefix})+1,length(id_tree)))
where id_tree like concat(#{idTreePrefix},'%')
</update>
<select id="selectByParentId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_department
where parent_id = #{parentId,jdbcType=INTEGER} and 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.boco.nbd.wios.manage.mapper.def.DictionaryMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Dictionary">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="sort_time" jdbcType="TIMESTAMP" property="sortTime" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
<result column="is_settle" jdbcType="INTEGER" property="isSettle" />
<result column="multiple" jdbcType="INTEGER" property="multiple" />
<result column="device_len" jdbcType="INTEGER" property="deviceLen" />
</resultMap>
<sql id="Base_Column_List">
id, type, name, value, status, sort_time, create_account, create_time, modify_account,
modify_time,is_settle,multiple,device_len
</sql>
<delete id="delete" parameterType="java.lang.String">
delete from t_dictionary
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Dictionary">
insert into t_dictionary (id, type, name,
value, status, sort_time,
create_account, create_time, modify_account,
modify_time,is_settle,multiple,device_len)
values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{sortTime,jdbcType=TIMESTAMP},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP}, #{isSettle,jdbcType=INTEGER}, #{multiple,jdbcType=INTEGER}, #{deviceLen,jdbcType=INTEGER})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Dictionary">
insert into t_dictionary
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="name != null">
name,
</if>
<if test="value != null">
value,
</if>
<if test="status != null">
status,
</if>
<if test="sortTime != null">
sort_time,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
<if test="isSettle != null">
is_settle,
</if>
<if test="multiple != null">
multiple,
</if>
<if test="deviceLen != null">
device_len,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="sortTime != null">
#{sortTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="isSettle != null">
#{isSettle,jdbcType=INTEGER},
</if>
<if test="multiple != null">
#{multiple,jdbcType=INTEGER},
</if>
<if test="deviceLen != null">
#{deviceLen,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Dictionary">
update t_dictionary
<set>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="sortTime != null">
sort_time = #{sortTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="isSettle != null">
is_settle = #{isSettle,jdbcType=INTEGER},
</if>
<if test="multiple != null">
multiple = #{multiple,jdbcType=INTEGER},
</if>
<if test="deviceLen != null">
device_len = #{deviceLen,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.Dictionary">
update t_dictionary
set type = #{type,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
sort_time = #{sortTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
is_settle = #{isSettle,jdbcType=INTEGER},
multiple = #{multiple,jdbcType=INTEGER},
device_len = #{deviceLen,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectById" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_dictionary
where id = #{id,jdbcType=VARCHAR}
</select>
<select id="selectValidByType" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_dictionary t
<where>
status=1
<if test="type != null">
and t.type = #{type}
</if>
<if test="name != null and name != ''">
and t.name = #{name}
</if>
<if test="value != null and value != ''">
and t.value = #{value}
</if>
</where>
order by t.value
</select>
<select id="selectValidById" resultType="com.boco.nbd.wios.manage.entity.bo.Dictionary">
select
<include refid="Base_Column_List" />
from t_dictionary t
<where>
status=1
<if test="type != null">
and t.type = #{type}
</if>
<if test="name != null and name != ''">
and t.name = #{name}
</if>
<if test="id != null and id != ''">
and t.id != #{id}
</if>
</where>
</select>
<delete id="deleteByType" parameterType="java.lang.String">
delete from t_dictionary
where type = #{type}
</delete>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_dictionary (id, type, name,
value, status, sort_time,
create_account, create_time, modify_account,
modify_time,is_settle,multiple,device_len)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.type,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR},
#{item.value,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER}, #{item.sortTime,jdbcType=TIMESTAMP},
#{item.createAccount,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.modifyAccount,jdbcType=VARCHAR},
#{item.modifyTime,jdbcType=TIMESTAMP},#{item.isSettle,jdbcType=INTEGER},#{item.multiple,jdbcType=INTEGER},#{item.deviceLen,jdbcType=INTEGER})
</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.boco.nbd.wios.manage.mapper.def.DispatchConfigMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.DispatchConfig" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="region_id" property="regionId" jdbcType="INTEGER" />
<result column="supplier_id" property="supplierId" jdbcType="VARCHAR" />
<result column="dispatch_num" property="dispatchNum" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
<result column="is_del" property="isDel" jdbcType="INTEGER" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
id, region_id, supplier_id, dispatch_num, create_time, modify_time, is_del
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.DispatchConfigCriteria" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from t_dispatch_config
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from t_dispatch_config
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from t_dispatch_config
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.DispatchConfigCriteria" >
delete from t_dispatch_config
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.DispatchConfig" >
insert into t_dispatch_config (id, region_id, supplier_id,
dispatch_num, create_time, modify_time,
is_del)
values (#{id,jdbcType=VARCHAR}, #{regionId,jdbcType=INTEGER}, #{supplierId,jdbcType=VARCHAR},
#{dispatchNum,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP},
#{isDel,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.DispatchConfig" >
insert into t_dispatch_config
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="regionId != null" >
region_id,
</if>
<if test="supplierId != null" >
supplier_id,
</if>
<if test="dispatchNum != null" >
dispatch_num,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
<if test="isDel != null" >
is_del,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="regionId != null" >
#{regionId,jdbcType=INTEGER},
</if>
<if test="supplierId != null" >
#{supplierId,jdbcType=VARCHAR},
</if>
<if test="dispatchNum != null" >
#{dispatchNum,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null" >
#{isDel,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.DispatchConfigCriteria" resultType="java.lang.Integer" >
select count(*) from t_dispatch_config
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<select id="getDispatchConfigListByRegionId" resultType="com.boco.nbd.wios.manage.entity.bo.DispatchConfig">
select
<include refid="Base_Column_List" />
from t_dispatch_config
where is_del=0 and region_id = #{regionId,jdbcType=INTEGER}
</select>
<select id="getDispatchConfigListByCondition" resultType="com.boco.nbd.wios.manage.entity.bo.DispatchConfig">
select
<include refid="Base_Column_List" />
from t_dispatch_config
where is_del=0
<if test="supplierId != null and supplierId != ''" >
and supplier_id = #{supplierId,jdbcType=INTEGER}
</if>
<if test="list != null" >
and region_id in
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
order by region_id desc
</select>
<update id="updateByExampleSelective" parameterType="map" >
update t_dispatch_config
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.regionId != null" >
region_id = #{record.regionId,jdbcType=INTEGER},
</if>
<if test="record.supplierId != null" >
supplier_id = #{record.supplierId,jdbcType=VARCHAR},
</if>
<if test="record.dispatchNum != null" >
dispatch_num = #{record.dispatchNum,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.modifyTime != null" >
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null" >
is_del = #{record.isDel,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update t_dispatch_config
set id = #{record.id,jdbcType=VARCHAR},
region_id = #{record.regionId,jdbcType=INTEGER},
supplier_id = #{record.supplierId,jdbcType=VARCHAR},
dispatch_num = #{record.dispatchNum,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=INTEGER}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.DispatchConfig" >
update t_dispatch_config
<set >
<if test="regionId != null" >
region_id = #{regionId,jdbcType=INTEGER},
</if>
<if test="supplierId != null" >
supplier_id = #{supplierId,jdbcType=VARCHAR},
</if>
<if test="dispatchNum != null" >
dispatch_num = #{dispatchNum,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyTime != null" >
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null" >
is_del = #{isDel,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.DispatchConfig" >
update t_dispatch_config
set region_id = #{regionId,jdbcType=INTEGER},
supplier_id = #{supplierId,jdbcType=VARCHAR},
dispatch_num = #{dispatchNum,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.EvaluationStatisticsMapper">
<select id="getNormalOrderFiled" parameterType="com.boco.nbd.wios.flow.entity.qo.EvaluationStatisticsQo" resultType="com.boco.nbd.wios.flow.entity.po.OrderPO">
select *
from t_order
where type=1 and process_ins_id is not null and (node_flag!=199 and status=64)=false
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="installSupplierId != null and installSupplierId != ''" >
and install_supplier_id = #{installSupplierId}
</if>
<if test="areaId != null and areaId != ''" >
and area_id = #{areaId}
</if>
<if test="electricExpand != null and electricExpand != ''">
and electric_expand = #{electricExpand}
</if>
<if test="nodeFlag != null ">
and node_flag in
<foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
#{nodeFlag}
</foreach>
</if>
</select>
<select id="getOrderFiled" parameterType="com.boco.nbd.wios.flow.entity.qo.EvaluationStatisticsQo" resultType="com.boco.nbd.wios.flow.entity.po.OrderPO">
select *
from t_order
where type=1 and process_ins_id is not null and node_flag = '199'
<if test='timeType == "1"'>
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test='timeType == "2"'>
and DATE_FORMAT(close_time,'%Y-%m-%d')&gt;= #{startTime}
and DATE_FORMAT(close_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="installSupplierId != null and installSupplierId != ''" >
and install_supplier_id = #{installSupplierId}
</if>
<if test="areaId != null and areaId != ''" >
and area_id = #{areaId}
</if>
<if test="electricExpand != null and electricExpand != ''">
and electric_expand = #{electricExpand}
</if>
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.ExpandPriceMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.ExpandPrice">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="region_id" jdbcType="INTEGER" property="regionId" />
<result column="region_name" jdbcType="VARCHAR" property="regionName" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="update_account" jdbcType="VARCHAR" property="updateAccount" />
</resultMap>
<sql id="Base_Column_List">
id, region_id, region_name, price, status, create_time, create_account, update_time,
update_account
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_expand_price
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.ExpandPrice">
insert into t_expand_price (id, region_id, region_name,
price, status, create_time,
create_account, update_time, update_account
)
values (#{id,jdbcType=INTEGER}, #{regionId,jdbcType=INTEGER}, #{regionName,jdbcType=VARCHAR},
#{price,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{createAccount,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{updateAccount,jdbcType=VARCHAR}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.ExpandPrice">
insert into t_expand_price
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="regionName != null">
region_name,
</if>
<if test="price != null">
price,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="updateAccount != null">
update_account,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="regionId != null">
#{regionId,jdbcType=INTEGER},
</if>
<if test="regionName != null">
#{regionName,jdbcType=VARCHAR},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateAccount != null">
#{updateAccount,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.ExpandPrice">
update t_expand_price
<set>
<if test="regionId != null">
region_id = #{regionId,jdbcType=INTEGER},
</if>
<if test="regionName != null">
region_name = #{regionName,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateAccount != null">
update_account = #{updateAccount,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.ExpandPrice">
update t_expand_price
set region_id = #{regionId,jdbcType=INTEGER},
region_name = #{regionName,jdbcType=VARCHAR},
price = #{price,jdbcType=DECIMAL},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_account = #{updateAccount,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_expand_price
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByRegionId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_expand_price
where status = 1
<if test="regionId != null and regionId != ''">
and region_id = #{regionId,jdbcType=INTEGER}
</if>
order by create_time desc
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.FlowMapper">
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.FlowOrderInstallMapper">
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.FlowOrderMapper">
<sql id="Base_Column_List">
id
,process_ins_id,node_flag,
oem_id,oem_name,oem_agent_id,
oem_agent_name,oem_agent_code,oem_agent_info,
oem_agent_contact_name,oem_agent_contact_phone,out_order_id,
contract_id,supplier_contract_id,user_name,
user_phone,user_sex,contact_name,
contact_phone,region_id,city_name,
city_id,region_name,region_level,
province_name,province_id,area_name,
area_id,country_name,country_id,
warehouse_id,address,refuse_order_reason,
is_pick_car,vehicle_model,vehicle_chassis_no,
vehicle_vin,vehicle_parking_no,vehicle_parking_status,
survey_before_sale_enable,manu_dispatch_enable,wallbox_model,
pack_type,status,type,
expand_status,expand_fail_reason,expand_fail_operate,
expand_remark,survey_staff_id,survey_check_fail_num,
survey_staff_phone,survey_staff_name,survey_finish_time,
survey_reserve_time,survey_client_name,survey_client_phone,
survey_cams_phone,survey_reserve_remark,install_supplier_id,
install_supplier_name,install_staff_id,install_check_fail_num,
install_staff_phone,install_staff_name,install_finish_time,
install_reserve_time,install_client_name,install_client_phone,
install_cams_phone,install_reserve_remark,survey_finish_fail_reason,
survey_rectify_fail_reason,install_change_fail_reason,install_finish_fail_reason,
install_rectify_fail_reason,close_order_reason,install_change_attachment_files,
survey_reserve_fail_info,install_reserve_fail_info,files,
description,score,visit_content,
invoice_time,estate_type,has_independent_parking,
install_position,property_agree,electric_expand,
need_erect_pile,dispatch_time,survey_submit_examine_time,
survey_approve_time,install_submit_examine_time,install_approve_time,
return_visit_time,close_time,create_account,
create_account_name,create_time,modify_account,
modify_time,item_model,survey_wallbox_model,
survey_pack_type,survey_item_model,install_wallbox_model,
install_pack_type,install_item_model,address_lat,
address_lng,survey_follow_time,install_follow_time,
connect_person,connect_person_name,want_home_time,
install_emergency_level,remark,is_connect,
is_need_survey,shipno
</sql>
<select id="getOrderData" resultType="com.boco.nbd.wios.flow.entity.bo.OrderBO">
select a.id,
case a.expand_status
when 1 then '通过'
when 2 then '不通过'
else '' end expand_status,
b.name oem_name,
b.code oem_code,
c.name oem_agent_name,
c.code oem_agent_code,
c.organization_code oem_agent_code,
d.name supplier_name,
e.name survey_staff_name,
e.phone survey_staff_phone,
f.name install_staff_name,
f.phone install_staff_phone,
g.name region_name,
h.secret_no virtual_user_phone,
i.wallbox_no,
i.real_cable_meter,
i.predict_total_fee
from t_order a
left join t_oem b on a.oem_id = b.id
left join t_oem c on a.oem_agent_id = c.id
left join t_supplier d on a.install_supplier_id = d.id
left join t_supplier_staff e on a.survey_staff_id = e.id
left join t_supplier_staff f on a.install_staff_id = f.id
left join t_region g on a.region_id = g.id
left join t_secret_phone h on h.phone = a.user_phone and h.status = 1
left join t_order_install i on i.order_id = a.id
where 1=1
<if test="ids !=null and ids.size>0">
and a.id in
<foreach item="id" collection="ids" open="(" close=")" separator=",">
#{id}
</foreach>
</if>
</select>
<select id="getUserMoreInfo" resultType="com.ihidea.core.support.session.SessionInfo">
select id userId,account loginname,name userName from
wb_account
where 1=1
<if test="userIds !=null and userIds.size>0">
and id in
<foreach item="userId" collection="userIds" open="(" close=")" separator=",">
#{userId}
</foreach>
</if>
</select>
<select id="getOrderByNodeFlagAndCreateTime" resultType="com.boco.nbd.wios.flow.entity.po.OrderPO">
select
<include refid="Base_Column_List"/>
from t_order
where type=1 and process_ins_id is not null
<if test="nodeFlag != null and nodeFlag != ''">
and node_flag &gt; #{nodeFlag}
</if>
<if test="createTime != null and createTime != ''">
and date_format(create_time,'%Y-%m')=#{createTime}
</if>
</select>
<select id="getSendMessageData" resultType="com.boco.nbd.wios.flow.entity.po.SendMessagePO">
select node_flag,
id,
survey_client_phone user_phone,
survey_staff_phone staff_phone,
survey_staff_name staff_name,
survey_reserve_time reserve_time
from t_order
where node_flag = 105
and status!=64
and survey_reserve_time <![CDATA[>=]]>#{startTime}
and survey_reserve_time <![CDATA[<=]]>#{endTime}
union all
select node_flag,
id,
install_client_phone user_phone,
install_staff_phone staff_phone,
install_staff_name staff_name,
install_reserve_time reserve_time
from t_order
where node_flag = 110
and status!=64
and install_reserve_time <![CDATA[>=]]>#{startTime}
and install_reserve_time <![CDATA[<=]]>#{endTime}
</select>
<select id="getPmUser" resultType="com.boco.nbd.wios.flow.entity.po.PmUserPO">
select a.account_id, a.region_id
from t_cams_account a
inner join wb_account_role b on a.account_id = b.account_id
where a.status = 1
and b.role_id = 5
</select>
<select id="getUsableSupplier" resultType="com.boco.nbd.wios.flow.entity.po.UsableSupplierPO">
select a.id supplier_id, a.name supplier_name, a.region_id, a.oem_code, a.pack_type, a.level, max_order_quantity
from t_supplier a
inner join t_supplier_contract b on a.id = b.supplier_id and b.status = 2
where a.status = 1
and a.check_status = 1
</select>
<select id="getSupplierReceiveInfo" resultType="com.boco.nbd.wios.flow.entity.po.SupplierReceivePO">
select install_supplier_id supplier_id, region_id, count(*) receive_num
from t_order
where 1=1
<if test="supplierId != null">
and install_supplier_id = #{supplierId}
</if>
<if test="regionId != null and regionId != ''">
and region_id = #{regionId}
</if>
</select>
<select id="selectOrderPO" resultType="com.boco.nbd.wios.flow.entity.po.OrderPO">
select *
from t_order a
where 1 = 1
<if test="outOrderId != null and outOrderId != ''">
and a.out_order_id=#{outOrderId}
</if>
<if test="userName != null and userName != ''">
and a.user_name=#{userName}
</if>
<if test="userPhone != null and userPhone != ''">
and a.user_phone=#{userPhone}
</if>
<if test="oemAgentInfo != null and oemAgentInfo != ''">
and a.oem_agent_info like concat(#{oemAgentInfo}, '%')
</if>
<if test="oemAgentName != null and oemAgentName != ''">
and a.oem_agent_name like concat(#{oemAgentName}, '%')
</if>
<if test="id != null and id != ''">
and a.id =#{id}
</if>
<if test="oemId != null">
and a.oem_id =#{oemId}
</if>
<if test="status != null and status != ''">
and a.status =#{status}
</if>
<if test="countryId != null and countryId != ''">
a.country_id in (#{countryId})
</if>
<if test="areaId != null and areaId != ''">
a.area_id in (#{areaId})
</if>
<if test="provinceId != null and provinceId != ''">
a.province_id in (#{provinceId})
</if>
<if test="regionId != null and regionId != ''">
a.region_id in (#{regionId})
</if>
<if test="cityId != null and cityId != ''">
a.city_id in (#{cityId})
</if>
<if test="wallboxNo != null and wallboxNo != ''">
and a.status =#{status}
</if>
<if test="supplierName != null and supplierName != ''">
and a.install_supplier_name like concat(#{supplierName}, '%')
</if>
<if test="supplierId != null and supplierId != ''">
and a.install_supplier_id in (#{supplierId})
</if>
<if test="type != null">
and a.type in (#{type})
</if>
<if test="surveyFinishTimeStart != null">
and a.survey_finish_time <![CDATA[<=]]>#{surveyFinishTimeStart}
</if>
<if test="surveyFinishTimeEnd != null">
and a.survey_finish_time <![CDATA[<=]]>#{surveyFinishTimeEnd}
</if>
<if test="installFinishTimeStart != null">
and a.install_finish_time <![CDATA[>=]]>#{installFinishTimeStart}
</if>
<if test="installFinishTimeEnd != null">
and a.install_finish_time <![CDATA[<=]]>#{installFinishTimeEnd}
</if>
<if test="overtimeType != null">
and a.overtime_type =#{overtimeType}
</if>
<if test="scoreGt != null">
and a.client_rate <![CDATA[>=]]>#{scoreGt}
</if>
<if test="scoreLt != null">
and a.client_rate <![CDATA[<=]]>#{scoreLt}
</if>
order by a.create_time desc
</select>
<select id="getVisitOrderScore" resultType="com.boco.nbd.wios.flow.entity.po.VisitOrderPO">
select a.out_order_id,
'cams APP' source,
user_name,
user_phone,
a.score,
a.know_after_sales_channel,
a.install_length,
c.score_data
from t_order a
left join (select b.order_id,
group_concat(replace(b.code, 'customer_item', ''), ',', b.name, ',', b.score,',', b.description, ';') score_data
from t_order_score b
where b.status = 1
group by b.order_id) c
on a.id = c.order_id
where 1=1
<if test="status != null">
and a.status = #{status}
</if>
<if test="id != null and id != ''">
and a.id =#{id}
</if>
<if test="userName != null and userName != ''">
and a.user_name=#{userName}
</if>
<if test="userPhone != null and userPhone != ''">
and a.user_phone=#{userPhone}
</if>
<if test="oemName != null and oemName != ''">
and a.oem_name like concat(#{oemName}, '%')
</if>
<if test="supplierName != null and supplierName != ''">
and a.install_supplier_name like concat(#{supplierName}, '%')
</if>
<if test="surveyFinishStartTime != null and surveyFinishStartTime != ''">
and a.survey_finish_time &gt;= #{surveyFinishStartTime}
</if>
<if test="surveyFinishEndTime != null and surveyFinishEndTime != ''">
and a.survey_finish_time &lt;= #{surveyFinishEndTime}
</if>
<if test="installFinishStartTime != null and installFinishStartTime != ''">
and a.install_finish_time &gt;= #{installFinishStartTime}
</if>
<if test="installFinishEndTime != null and installFinishEndTime != ''">
and a.install_finish_time &lt;= #{installFinishEndTime}
</if>
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.FlowOrderSurveyMapper">
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.GroupMapper">
<delete id="deleteNodeGroup">
delete
from tv3_lug_node_group
where group_id = #{groupId}
</delete>
<delete id="deleteUserGroup">
delete
from tv3_lug_group_user
where group_id = #{groupId}
</delete>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.HolidayMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.flow.entity.po.HolidayPO">
<result property="id" column="id" jdbcType="VARCHAR"/>
<result property="holidayDate" column="holiday_date" jdbcType="TIMESTAMP"/>
<result property="holidayDesc" column="holiday_desc" jdbcType="VARCHAR"/>
<result property="holidayType" column="holiday_type" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,holiday_date,holiday_desc,holiday_type
</sql>
<select id="getList" resultType="com.boco.nbd.wios.flow.entity.po.HolidayPO">
select <include refid="Base_Column_List" /> from t_holiday where holiday_date like #{date}"%" order by holiday_date asc
</select>
<select id="getListByType" resultType="java.lang.String">
select holiday_date from t_holiday where holiday_type=#{holidayType} and holiday_date like #{date}"%" order by holiday_date asc
</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.boco.nbd.wios.flow.mapper.def.ImportOrderMapper">
<select id="getImportOrderAll" resultType="com.boco.nbd.wios.flow.entity.bo.OrderTempBO">
select a.id,
a.oem_name,
b.code oem_code,
c.name region_name,
a.address,
case a.user_sex when 0 then '女' when 1 then '男' else '未知' end user_sex,
a.user_phone,
case a.survey_before_sale_enable when 0 then '否' when 1 then '是' end survey_before_sale_enable,
a.vehicle_model,
a.vehicle_chassis_no,
a.wallbox_model,
a.vehicle_parking_status,
a.vehicle_parking_no,
a.out_order_id,
date_format(a.invoice_time, '%Y-%m-%d') invoice_time,
a.oem_agent_name,
a.oem_agent_contact_name,
a.oem_agent_info,
case a.estate_type when 1 then '普通高层' when 2 then '商用两住' when 3 then '别墅' when 4 then '公司' when 5 then '厂房' when 6 then '自建房' when 7 then '其他' end estate_type,
case a.has_independent_parking when 0 then '否' when 1 then '是' end has_independent_parking,
case a.install_position when 1 then '室内' when 2 then '室外' end install_position,
case a.property_agree when 0 then '不同意' when 1 then '同意' end property_agree,
case a.electric_expand when 0 then '否' when 1 then '是' end electric_expand,
case a.need_erect_pile when 0 then '否' when 1 then '是' end need_erect_pile,
case a.manu_dispatch_enable when 0 then '否' when 1 then '是' end manu_dispatch_enable,
case a.is_need_survey when 0 then '否' when 1 then '是' end is_need_survey,
case a.install_emergency_level when 1 then '一般' when 2 then '紧急' end install_emergency_level
from t_order_temp a
left join t_oem b on a.oem_id = b.id
left join t_region c on a.region_id = c.id
where a.type=#{type}
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.InfoConfigMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.InfoConfig" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
<result column="is_del" property="isDel" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, type, name, create_time, modify_time, is_del
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from t_info_config
where id = #{id,jdbcType=VARCHAR}
</select>
<select id="selectValidNameType" resultType="com.boco.nbd.wios.manage.entity.bo.InfoConfig">
SELECT
<include refid="Base_Column_List" />
FROM
t_info_config
<where>
is_del=0
<if test="type != null">
and type =#{type,jdbcType=INTEGER}
</if>
<if test="name != null and name != ''">
<bind name="nameLike" value="'%' + name + '%'"/>
and name like #{nameLike}
</if>
</where>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from t_info_config
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.InfoConfig" >
insert into t_info_config (id, type, name,
create_time, modify_time, is_del
)
values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP}, #{isDel,jdbcType=INTEGER}
)
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.InfoConfig" >
insert into t_info_config
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="type != null" >
type,
</if>
<if test="name != null" >
name,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
<if test="isDel != null" >
is_del,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=INTEGER},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null" >
#{isDel,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.InfoConfig" >
update t_info_config
<set >
<if test="type != null" >
type = #{type,jdbcType=INTEGER},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyTime != null" >
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null" >
is_del = #{isDel,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.InfoConfig">
update t_info_config
set type = #{type,jdbcType=INTEGER},
name = #{name,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</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.boco.nbd.wios.log.mapper.def.InterfaceMonitorMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.log.entity.po.InterfaceMonitorPO">
<result property="interfaceName" column="interface_name" jdbcType="VARCHAR"/>
<result property="interfaceAddress" column="interface_address" jdbcType="VARCHAR"/>
<result property="orderNo" column="order_no" jdbcType="VARCHAR"/>
<result property="responseData" column="response_data" jdbcType="VARCHAR"/>
<result property="responseTime" column="response_time" jdbcType="INTEGER"/>
<result property="interfaceState" column="interface_state" jdbcType="INTEGER"/>
<result property="callTime" column="call_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="QuerySql">
<where>
<if test="interfaceName != null and interfaceName != ''">
and interface_name = #{interfaceName}
</if>
<if test="interfaceState != null and interfaceState != ''">
and interface_state = #{interfaceState}
</if>
<if test="startTime != null and startTime != '' ">
<if test='timeType == "hour"'>
and DATE_FORMAT(call_time,'%Y-%m-%d %H:%i:%s') &gt;= #{startTime}
</if>
<if test='timeType == "day"'>
and DATE_FORMAT(call_time,'%Y-%m-%d') &gt;= #{startTime}
</if>
</if>
<if test="endTime != null and endTime != '' ">
<if test='timeType == "hour"'>
and DATE_FORMAT(call_time,'%Y-%m-%d %H:%i:%s') &lt;= #{endTime}
</if>
<if test='timeType == "day"'>
and DATE_FORMAT(call_time,'%Y-%m-%d') &lt;= #{endTime}
</if>
</if>
</where>
</sql>
<select id="getInterfaceMonitorList" parameterType="com.boco.nbd.wios.log.entity.qo.InterfaceMonitorQO" resultType="com.boco.nbd.wios.log.entity.po.InterfaceMonitorPO">
select interface_name,interface_address,order_no,
response_data,response_time,
CASE interface_state WHEN '1' THEN '正常' ELSE '异常' END interface_state,
call_time
from t_interface_monitor <include refid="QuerySql"/>
</select>
<select id="getInterfaceMonitorCount" parameterType="com.boco.nbd.wios.log.entity.qo.InterfaceMonitorQO" resultType="java.lang.Integer">
select count(*) from t_interface_monitor <include refid="QuerySql"/>
</select>
<resultMap id="InterfaceMonitorCountMap" type="java.util.HashMap">
<result column="name" property="key" javaType="java.lang.String"/>
<result column="num" property="value" javaType="java.lang.Integer"/>
</resultMap>
<select id="getInterfaceMonitorCountMap" parameterType="com.boco.nbd.wios.log.entity.qo.InterfaceMonitorQO" resultMap="InterfaceMonitorCountMap">
select response_data name,count(*) num from t_interface_monitor <include refid="QuerySql"/> GROUP BY response_data
</select>
<select id="getInterfaceMonitorMothCountMap" parameterType="com.boco.nbd.wios.log.entity.qo.InterfaceMonitorQO" resultMap="InterfaceMonitorCountMap">
select DATE_FORMAT( call_time, '%Y-%m-%d' ) name,count(*) num from t_interface_monitor <include refid="QuerySql"/> GROUP BY DATE_FORMAT( call_time, '%Y-%m-%d' )
</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.boco.nbd.wios.manage.mapper.def.InvoiceMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.settlement.po.Invoice">
<id column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="additional_cost_invoice_status" jdbcType="INTEGER" property="additionalCostInvoiceStatus" />
<result column="additional_cost_invoice_date" jdbcType="DATE" property="additionalCostInvoiceDate" />
<result column="additional_cost_invoice_number" jdbcType="VARCHAR" property="additionalCostInvoiceNumber" />
<result column="package_device_invoice_status" jdbcType="INTEGER" property="packageDeviceInvoiceStatus" />
<result column="package_device_invoice_date" jdbcType="DATE" property="packageDeviceInvoiceDate" />
<result column="package_device_fee_with_tax" jdbcType="DECIMAL" property="packageDeviceFeeWithTax" />
<result column="package_device_tax" jdbcType="DECIMAL" property="packageDeviceTax" />
<result column="package_device_invoice_number" jdbcType="VARCHAR" property="packageDeviceInvoiceNumber" />
<result column="package_device_receive_status" jdbcType="INTEGER" property="packageDeviceReceiveStatus" />
<result column="package_install_invoice_status" jdbcType="INTEGER" property="packageInstallInvoiceStatus" />
<result column="package_install_invoice_date" jdbcType="DATE" property="packageInstallInvoiceDate" />
<result column="package_install_fee_with_tax" jdbcType="DECIMAL" property="packageInstallFeeWithTax" />
<result column="package_install_tax" jdbcType="DECIMAL" property="packageInstallTax" />
<result column="package_install_invoice_number" jdbcType="VARCHAR" property="packageInstallInvoiceNumber" />
<result column="package_install_receive_status" jdbcType="INTEGER" property="packageInstallReceiveStatus" />
<result column="supplier_receive_invoice_status" jdbcType="INTEGER" property="supplierReceiveInvoiceStatus" />
<result column="supplier_invoice_date" jdbcType="DATE" property="supplierInvoiceDate" />
<result column="supplier_fee_with_tax" jdbcType="DECIMAL" property="supplierFeeWithTax" />
<result column="supplier_tax" jdbcType="DECIMAL" property="supplierTax" />
<result column="supplier_invoice_number" jdbcType="VARCHAR" property="supplierInvoiceNumber" />
<result column="supplier_pay_status" jdbcType="INTEGER" property="supplierPayStatus" />
<result column="receive_invoice_status" jdbcType="INTEGER" property="receiveInvoiceStatus" />
<result column="invoice_date" jdbcType="DATE" property="invoiceDate" />
<result column="fee_with_tax" jdbcType="DECIMAL" property="feeWithTax" />
<result column="tax" jdbcType="DECIMAL" property="tax" />
<result column="invoice_number" jdbcType="VARCHAR" property="invoiceNumber" />
<result column="pay_status" jdbcType="INTEGER" property="payStatus" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
<result column="is_del" jdbcType="INTEGER" property="isDel" />
<result column="submit_item" jdbcType="INTEGER" property="submitItem" />
</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">
order_id, additional_cost_invoice_status, additional_cost_invoice_date, additional_cost_invoice_number,
package_device_invoice_status, package_device_invoice_date, package_device_fee_with_tax,
package_device_tax, package_device_invoice_number, package_device_receive_status,
package_install_invoice_status, package_install_invoice_date, package_install_fee_with_tax,
package_install_tax, package_install_invoice_number, package_install_receive_status,
supplier_receive_invoice_status, supplier_invoice_date, supplier_fee_with_tax, supplier_tax,
supplier_invoice_number, supplier_pay_status, create_time, modify_time, is_del, submit_item
</sql>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.InvoiceCriteria" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_invoice
<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="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_invoice
where order_id = #{orderId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_invoice
where order_id = #{orderId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.InvoiceCriteria">
delete from t_invoice
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.Invoice">
insert into t_invoice (order_id, additional_cost_invoice_status,
additional_cost_invoice_date, additional_cost_invoice_number,
package_device_invoice_status, package_device_invoice_date,
package_device_fee_with_tax, package_device_tax,
package_device_invoice_number, package_device_receive_status,
package_install_invoice_status, package_install_invoice_date,
package_install_fee_with_tax, package_install_tax,
package_install_invoice_number, package_install_receive_status,
supplier_receive_invoice_status, supplier_invoice_date,
supplier_fee_with_tax, supplier_tax, supplier_invoice_number,
supplier_pay_status, create_time, modify_time,
is_del, submit_item)
values (#{orderId,jdbcType=VARCHAR}, #{additionalCostInvoiceStatus,jdbcType=INTEGER},
#{additionalCostInvoiceDate,jdbcType=DATE}, #{additionalCostInvoiceNumber,jdbcType=VARCHAR},
#{packageDeviceInvoiceStatus,jdbcType=INTEGER}, #{packageDeviceInvoiceDate,jdbcType=DATE},
#{packageDeviceFeeWithTax,jdbcType=DECIMAL}, #{packageDeviceTax,jdbcType=DECIMAL},
#{packageDeviceInvoiceNumber,jdbcType=VARCHAR}, #{packageDeviceReceiveStatus,jdbcType=INTEGER},
#{packageInstallInvoiceStatus,jdbcType=INTEGER}, #{packageInstallInvoiceDate,jdbcType=DATE},
#{packageInstallFeeWithTax,jdbcType=DECIMAL}, #{packageInstallTax,jdbcType=DECIMAL},
#{packageInstallInvoiceNumber,jdbcType=VARCHAR}, #{packageInstallReceiveStatus,jdbcType=INTEGER},
#{supplierReceiveInvoiceStatus,jdbcType=INTEGER}, #{supplierInvoiceDate,jdbcType=DATE},
#{supplierFeeWithTax,jdbcType=DECIMAL}, #{supplierTax,jdbcType=DECIMAL}, #{supplierInvoiceNumber,jdbcType=VARCHAR},
#{supplierPayStatus,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{modifyTime,jdbcType=TIMESTAMP},
#{isDel,jdbcType=INTEGER}, #{submitItem,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.Invoice">
insert into t_invoice
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderId != null">
order_id,
</if>
<if test="additionalCostInvoiceStatus != null">
additional_cost_invoice_status,
</if>
<if test="additionalCostInvoiceDate != null">
additional_cost_invoice_date,
</if>
<if test="additionalCostInvoiceNumber != null">
additional_cost_invoice_number,
</if>
<if test="packageDeviceInvoiceStatus != null">
package_device_invoice_status,
</if>
<if test="packageDeviceInvoiceDate != null">
package_device_invoice_date,
</if>
<if test="packageDeviceFeeWithTax != null">
package_device_fee_with_tax,
</if>
<if test="packageDeviceTax != null">
package_device_tax,
</if>
<if test="packageDeviceInvoiceNumber != null">
package_device_invoice_number,
</if>
<if test="packageDeviceReceiveStatus != null">
package_device_receive_status,
</if>
<if test="packageInstallInvoiceStatus != null">
package_install_invoice_status,
</if>
<if test="packageInstallInvoiceDate != null">
package_install_invoice_date,
</if>
<if test="packageInstallFeeWithTax != null">
package_install_fee_with_tax,
</if>
<if test="packageInstallTax != null">
package_install_tax,
</if>
<if test="packageInstallInvoiceNumber != null">
package_install_invoice_number,
</if>
<if test="packageInstallReceiveStatus != null">
package_install_receive_status,
</if>
<if test="supplierReceiveInvoiceStatus != null">
supplier_receive_invoice_status,
</if>
<if test="supplierInvoiceDate != null">
supplier_invoice_date,
</if>
<if test="supplierFeeWithTax != null">
supplier_fee_with_tax,
</if>
<if test="supplierTax != null">
supplier_tax,
</if>
<if test="supplierInvoiceNumber != null">
supplier_invoice_number,
</if>
<if test="supplierPayStatus != null">
supplier_pay_status,
</if>
<if test="receiveInvoiceStatus != null">
receive_invoice_status,
</if>
<if test="invoiceDate != null">
invoice_date,
</if>
<if test="feeWithTax != null">
fee_with_tax,
</if>
<if test="tax != null">
tax,
</if>
<if test="invoiceNumber != null">
invoice_number,
</if>
<if test="payStatus != null">
pay_status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyTime != null">
modify_time,
</if>
<if test="isDel != null">
is_del,
</if>
<if test="submitItem != null">
submit_item,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="additionalCostInvoiceStatus != null">
#{additionalCostInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="additionalCostInvoiceDate != null">
#{additionalCostInvoiceDate,jdbcType=DATE},
</if>
<if test="additionalCostInvoiceNumber != null">
#{additionalCostInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="packageDeviceInvoiceStatus != null">
#{packageDeviceInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="packageDeviceInvoiceDate != null">
#{packageDeviceInvoiceDate,jdbcType=DATE},
</if>
<if test="packageDeviceFeeWithTax != null">
#{packageDeviceFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="packageDeviceTax != null">
#{packageDeviceTax,jdbcType=DECIMAL},
</if>
<if test="packageDeviceInvoiceNumber != null">
#{packageDeviceInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="packageDeviceReceiveStatus != null">
#{packageDeviceReceiveStatus,jdbcType=INTEGER},
</if>
<if test="packageInstallInvoiceStatus != null">
#{packageInstallInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="packageInstallInvoiceDate != null">
#{packageInstallInvoiceDate,jdbcType=DATE},
</if>
<if test="packageInstallFeeWithTax != null">
#{packageInstallFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="packageInstallTax != null">
#{packageInstallTax,jdbcType=DECIMAL},
</if>
<if test="packageInstallInvoiceNumber != null">
#{packageInstallInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="packageInstallReceiveStatus != null">
#{packageInstallReceiveStatus,jdbcType=INTEGER},
</if>
<if test="supplierReceiveInvoiceStatus != null">
#{supplierReceiveInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="supplierInvoiceDate != null">
#{supplierInvoiceDate,jdbcType=DATE},
</if>
<if test="supplierFeeWithTax != null">
#{supplierFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="supplierTax != null">
#{supplierTax,jdbcType=DECIMAL},
</if>
<if test="supplierInvoiceNumber != null">
#{supplierInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="supplierPayStatus != null">
#{supplierPayStatus,jdbcType=INTEGER},
</if>
<if test="receiveInvoiceStatus != null">
#{receiveInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="invoiceDate != null">
#{invoiceDate,jdbcType=DATE},
</if>
<if test="feeWithTax != null">
#{feeWithTax,jdbcType=DECIMAL},
</if>
<if test="tax != null">
#{tax,jdbcType=DECIMAL},
</if>
<if test="invoiceNumber != null">
#{invoiceNumber,jdbcType=VARCHAR},
</if>
<if test="payStatus != null">
#{payStatus,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
#{isDel,jdbcType=INTEGER},
</if>
<if test="submitItem != null">
#{submitItem,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.InvoiceCriteria" resultType="java.lang.Long">
select count(*) from t_invoice
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<select id="getAdditionalCostInvoiceList" resultType="com.boco.nbd.wios.manage.entity.settlement.po.Invoice">
select
<include refid="Base_Column_List" />
from t_invoice
where additional_cost_invoice_number is not null
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_invoice
<set>
<if test="record.orderId != null">
order_id = #{record.orderId,jdbcType=VARCHAR},
</if>
<if test="record.additionalCostInvoiceStatus != null">
additional_cost_invoice_status = #{record.additionalCostInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="record.additionalCostInvoiceDate != null">
additional_cost_invoice_date = #{record.additionalCostInvoiceDate,jdbcType=DATE},
</if>
<if test="record.additionalCostInvoiceNumber != null">
additional_cost_invoice_number = #{record.additionalCostInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="record.packageDeviceInvoiceStatus != null">
package_device_invoice_status = #{record.packageDeviceInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="record.packageDeviceInvoiceDate != null">
package_device_invoice_date = #{record.packageDeviceInvoiceDate,jdbcType=DATE},
</if>
<if test="record.packageDeviceFeeWithTax != null">
package_device_fee_with_tax = #{record.packageDeviceFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="record.packageDeviceTax != null">
package_device_tax = #{record.packageDeviceTax,jdbcType=DECIMAL},
</if>
<if test="record.packageDeviceInvoiceNumber != null">
package_device_invoice_number = #{record.packageDeviceInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="record.packageDeviceReceiveStatus != null">
package_device_receive_status = #{record.packageDeviceReceiveStatus,jdbcType=INTEGER},
</if>
<if test="record.packageInstallInvoiceStatus != null">
package_install_invoice_status = #{record.packageInstallInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="record.packageInstallInvoiceDate != null">
package_install_invoice_date = #{record.packageInstallInvoiceDate,jdbcType=DATE},
</if>
<if test="record.packageInstallFeeWithTax != null">
package_install_fee_with_tax = #{record.packageInstallFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="record.packageInstallTax != null">
package_install_tax = #{record.packageInstallTax,jdbcType=DECIMAL},
</if>
<if test="record.packageInstallInvoiceNumber != null">
package_install_invoice_number = #{record.packageInstallInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="record.packageInstallReceiveStatus != null">
package_install_receive_status = #{record.packageInstallReceiveStatus,jdbcType=INTEGER},
</if>
<if test="record.supplierReceiveInvoiceStatus != null">
supplier_receive_invoice_status = #{record.supplierReceiveInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="record.supplierInvoiceDate != null">
supplier_invoice_date = #{record.supplierInvoiceDate,jdbcType=DATE},
</if>
<if test="record.supplierFeeWithTax != null">
supplier_fee_with_tax = #{record.supplierFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="record.supplierTax != null">
supplier_tax = #{record.supplierTax,jdbcType=DECIMAL},
</if>
<if test="record.supplierInvoiceNumber != null">
supplier_invoice_number = #{record.supplierInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="record.supplierPayStatus != null">
supplier_pay_status = #{record.supplierPayStatus,jdbcType=INTEGER},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.modifyTime != null">
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="record.isDel != null">
is_del = #{record.isDel,jdbcType=INTEGER},
</if>
<if test="record.submitItem != null">
submit_item = #{record.submitItem,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_invoice
set order_id = #{record.orderId,jdbcType=VARCHAR},
additional_cost_invoice_status = #{record.additionalCostInvoiceStatus,jdbcType=INTEGER},
additional_cost_invoice_date = #{record.additionalCostInvoiceDate,jdbcType=DATE},
additional_cost_invoice_number = #{record.additionalCostInvoiceNumber,jdbcType=VARCHAR},
package_device_invoice_status = #{record.packageDeviceInvoiceStatus,jdbcType=INTEGER},
package_device_invoice_date = #{record.packageDeviceInvoiceDate,jdbcType=DATE},
package_device_fee_with_tax = #{record.packageDeviceFeeWithTax,jdbcType=DECIMAL},
package_device_tax = #{record.packageDeviceTax,jdbcType=DECIMAL},
package_device_invoice_number = #{record.packageDeviceInvoiceNumber,jdbcType=VARCHAR},
package_device_receive_status = #{record.packageDeviceReceiveStatus,jdbcType=INTEGER},
package_install_invoice_status = #{record.packageInstallInvoiceStatus,jdbcType=INTEGER},
package_install_invoice_date = #{record.packageInstallInvoiceDate,jdbcType=DATE},
package_install_fee_with_tax = #{record.packageInstallFeeWithTax,jdbcType=DECIMAL},
package_install_tax = #{record.packageInstallTax,jdbcType=DECIMAL},
package_install_invoice_number = #{record.packageInstallInvoiceNumber,jdbcType=VARCHAR},
package_install_receive_status = #{record.packageInstallReceiveStatus,jdbcType=INTEGER},
supplier_receive_invoice_status = #{record.supplierReceiveInvoiceStatus,jdbcType=INTEGER},
supplier_invoice_date = #{record.supplierInvoiceDate,jdbcType=DATE},
supplier_fee_with_tax = #{record.supplierFeeWithTax,jdbcType=DECIMAL},
supplier_tax = #{record.supplierTax,jdbcType=DECIMAL},
supplier_invoice_number = #{record.supplierInvoiceNumber,jdbcType=VARCHAR},
supplier_pay_status = #{record.supplierPayStatus,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
is_del = #{record.isDel,jdbcType=INTEGER},
submit_item = #{record.submitItem,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.Invoice">
update t_invoice
<set>
<if test="additionalCostInvoiceStatus != null">
additional_cost_invoice_status = #{additionalCostInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="additionalCostInvoiceDate != null">
additional_cost_invoice_date = #{additionalCostInvoiceDate,jdbcType=DATE},
</if>
<if test="additionalCostInvoiceNumber != null">
additional_cost_invoice_number = #{additionalCostInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="packageDeviceInvoiceStatus != null">
package_device_invoice_status = #{packageDeviceInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="packageDeviceInvoiceDate != null">
package_device_invoice_date = #{packageDeviceInvoiceDate,jdbcType=DATE},
</if>
<if test="packageDeviceFeeWithTax != null">
package_device_fee_with_tax = #{packageDeviceFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="packageDeviceTax != null">
package_device_tax = #{packageDeviceTax,jdbcType=DECIMAL},
</if>
<if test="packageDeviceInvoiceNumber != null">
package_device_invoice_number = #{packageDeviceInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="packageDeviceReceiveStatus != null">
package_device_receive_status = #{packageDeviceReceiveStatus,jdbcType=INTEGER},
</if>
<if test="packageInstallInvoiceStatus != null">
package_install_invoice_status = #{packageInstallInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="packageInstallInvoiceDate != null">
package_install_invoice_date = #{packageInstallInvoiceDate,jdbcType=DATE},
</if>
<if test="packageInstallFeeWithTax != null">
package_install_fee_with_tax = #{packageInstallFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="packageInstallTax != null">
package_install_tax = #{packageInstallTax,jdbcType=DECIMAL},
</if>
<if test="packageInstallInvoiceNumber != null">
package_install_invoice_number = #{packageInstallInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="packageInstallReceiveStatus != null">
package_install_receive_status = #{packageInstallReceiveStatus,jdbcType=INTEGER},
</if>
<if test="supplierReceiveInvoiceStatus != null">
supplier_receive_invoice_status = #{supplierReceiveInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="supplierInvoiceDate != null">
supplier_invoice_date = #{supplierInvoiceDate,jdbcType=DATE},
</if>
<if test="supplierFeeWithTax != null">
supplier_fee_with_tax = #{supplierFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="supplierTax != null">
supplier_tax = #{supplierTax,jdbcType=DECIMAL},
</if>
<if test="supplierInvoiceNumber != null">
supplier_invoice_number = #{supplierInvoiceNumber,jdbcType=VARCHAR},
</if>
<if test="supplierPayStatus != null">
supplier_pay_status = #{supplierPayStatus,jdbcType=INTEGER},
</if>
<if test="receiveInvoiceStatus != null">
receive_invoice_status = #{receiveInvoiceStatus,jdbcType=INTEGER},
</if>
<if test="invoiceDate != null">
invoice_date = #{invoiceDate,jdbcType=DATE},
</if>
<if test="feeWithTax != null">
fee_with_tax = #{feeWithTax,jdbcType=DECIMAL},
</if>
<if test="tax != null">
tax = #{tax,jdbcType=DECIMAL},
</if>
<if test="invoiceNumber != null">
invoice_number = #{invoiceNumber,jdbcType=VARCHAR},
</if>
<if test="payStatus != null">
pay_status = #{payStatus,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="isDel != null">
is_del = #{isDel,jdbcType=INTEGER},
</if>
<if test="submitItem != null">
submit_item = #{submitItem,jdbcType=INTEGER},
</if>
</set>
where order_id = #{orderId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.Invoice">
update t_invoice
set additional_cost_invoice_status = #{additionalCostInvoiceStatus,jdbcType=INTEGER},
additional_cost_invoice_date = #{additionalCostInvoiceDate,jdbcType=DATE},
additional_cost_invoice_number = #{additionalCostInvoiceNumber,jdbcType=VARCHAR},
package_device_invoice_status = #{packageDeviceInvoiceStatus,jdbcType=INTEGER},
package_device_invoice_date = #{packageDeviceInvoiceDate,jdbcType=DATE},
package_device_fee_with_tax = #{packageDeviceFeeWithTax,jdbcType=DECIMAL},
package_device_tax = #{packageDeviceTax,jdbcType=DECIMAL},
package_device_invoice_number = #{packageDeviceInvoiceNumber,jdbcType=VARCHAR},
package_device_receive_status = #{packageDeviceReceiveStatus,jdbcType=INTEGER},
package_install_invoice_status = #{packageInstallInvoiceStatus,jdbcType=INTEGER},
package_install_invoice_date = #{packageInstallInvoiceDate,jdbcType=DATE},
package_install_fee_with_tax = #{packageInstallFeeWithTax,jdbcType=DECIMAL},
package_install_tax = #{packageInstallTax,jdbcType=DECIMAL},
package_install_invoice_number = #{packageInstallInvoiceNumber,jdbcType=VARCHAR},
package_install_receive_status = #{packageInstallReceiveStatus,jdbcType=INTEGER},
supplier_receive_invoice_status = #{supplierReceiveInvoiceStatus,jdbcType=INTEGER},
supplier_invoice_date = #{supplierInvoiceDate,jdbcType=DATE},
supplier_fee_with_tax = #{supplierFeeWithTax,jdbcType=DECIMAL},
supplier_tax = #{supplierTax,jdbcType=DECIMAL},
supplier_invoice_number = #{supplierInvoiceNumber,jdbcType=VARCHAR},
supplier_pay_status = #{supplierPayStatus,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
is_del = #{isDel,jdbcType=INTEGER},
submit_item = #{submitItem,jdbcType=INTEGER}
where order_id = #{orderId,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.MaterialConfigMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.MaterialConfig">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="region_id" jdbcType="INTEGER" property="regionId" />
<result column="oem_id" jdbcType="INTEGER" property="oemId" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="update_account" jdbcType="VARCHAR" property="updateAccount" />
</resultMap>
<sql id="Base_Column_List">
id, type, region_id, oem_id, content, status, create_time, create_account, update_time,
update_account
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_material_config
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.MaterialConfig">
insert into t_material_config (id, type, region_id,
oem_id, content, status,
create_time, create_account, update_time,
update_account)
values (#{id,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{regionId,jdbcType=INTEGER},
#{oemId,jdbcType=INTEGER}, #{content,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{createAccount,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{updateAccount,jdbcType=VARCHAR})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.MaterialConfig">
insert into t_material_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="oemId != null">
oem_id,
</if>
<if test="content != null">
content,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="updateAccount != null">
update_account,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="regionId != null">
#{regionId,jdbcType=INTEGER},
</if>
<if test="oemId != null">
#{oemId,jdbcType=INTEGER},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateAccount != null">
#{updateAccount,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.MaterialConfig">
update t_material_config
<set>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<!-- <if test="regionId != null"> -->
region_id = #{regionId,jdbcType=INTEGER},
<!-- </if>
<if test="oemId != null"> -->
oem_id = #{oemId,jdbcType=INTEGER},
<!-- </if>
<if test="content != null"> -->
content = #{content,jdbcType=VARCHAR},
<!-- </if> -->
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateAccount != null">
update_account = #{updateAccount,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.MaterialConfig">
update t_material_config
set type = #{type,jdbcType=INTEGER},
region_id = #{regionId,jdbcType=INTEGER},
oem_id = #{oemId,jdbcType=INTEGER},
content = #{content,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_account = #{updateAccount,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultType="com.boco.nbd.wios.manage.entity.bo.MaterialConfigVo">
select
t.id,
t.type,
t.region_id,
t.oem_id,
t.status,
t.content,
t.create_time,
t.create_account,
t.update_time,
t.update_account,
r.name as regionName,
o.name as oemName,
r.id_tree as regionTree
from t_material_config t
left join t_region r on r.id=t.region_id
left join t_oem o on o.id=t.oem_id
where t.id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.MaterialConfigBo"
resultType="com.boco.nbd.wios.manage.entity.bo.MaterialConfigVo">
select
t.id, t.type, t.region_id, t.oem_id,t.content, t.status, t.create_time, t.create_account, t.update_time,
t.update_account
,r.name as regionName,o.name as oemName from t_material_config t
left join t_region r on r.id=t.region_id
left join t_oem o on o.id=t.oem_id
<where>
t.status = 1
<if test="regionId != null">
and t.region_id = #{regionId}
</if>
<if test="oemId != null">
and t.oem_id = #{oemId}
</if>
<if test="type != null">
and t.type = #{type}
</if>
<if test="oemName != null and oemName != ''">
<bind name="oemNameLike" value="'%' + oemName + '%'"/>
and o.name like #{oemNameLike}
</if>
</where>
order by t.create_time desc
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.MenuFieldMapper">
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.MenuMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Menu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="parent_id" property="parentId" jdbcType="VARCHAR" />
<result column="icon" property="icon" jdbcType="VARCHAR" />
<result column="e_name" property="eName" jdbcType="VARCHAR" />
<result column="c_name" property="cName" jdbcType="VARCHAR" />
<result column="path" property="path" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="INTEGER" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
id, parent_id, icon, e_name, c_name, path, type, status, create_time
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.MenuCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from wb_menu
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
select
<include refid="Base_Column_List" />
from wb_menu
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
delete from wb_menu
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.MenuCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
delete from wb_menu
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Menu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
insert into wb_menu (id, parent_id, icon,
e_name, c_name, path,
type, status, create_time
)
values (#{id,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{icon,jdbcType=VARCHAR},
#{eName,jdbcType=VARCHAR}, #{cName,jdbcType=VARCHAR}, #{path,jdbcType=VARCHAR},
#{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Menu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
insert into wb_menu
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="parentId != null" >
parent_id,
</if>
<if test="icon != null" >
icon,
</if>
<if test="eName != null" >
e_name,
</if>
<if test="cName != null" >
c_name,
</if>
<if test="path != null" >
path,
</if>
<if test="type != null" >
type,
</if>
<if test="status != null" >
status,
</if>
<if test="createTime != null" >
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="parentId != null" >
#{parentId,jdbcType=VARCHAR},
</if>
<if test="icon != null" >
#{icon,jdbcType=VARCHAR},
</if>
<if test="eName != null" >
#{eName,jdbcType=VARCHAR},
</if>
<if test="cName != null" >
#{cName,jdbcType=VARCHAR},
</if>
<if test="path != null" >
#{path,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=INTEGER},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.MenuCriteria" resultType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
select count(*) from wb_menu
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
update wb_menu
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.parentId != null" >
parent_id = #{record.parentId,jdbcType=VARCHAR},
</if>
<if test="record.icon != null" >
icon = #{record.icon,jdbcType=VARCHAR},
</if>
<if test="record.eName != null" >
e_name = #{record.eName,jdbcType=VARCHAR},
</if>
<if test="record.cName != null" >
c_name = #{record.cName,jdbcType=VARCHAR},
</if>
<if test="record.path != null" >
path = #{record.path,jdbcType=VARCHAR},
</if>
<if test="record.type != null" >
type = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.status != null" >
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
update wb_menu
set id = #{record.id,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=VARCHAR},
icon = #{record.icon,jdbcType=VARCHAR},
e_name = #{record.eName,jdbcType=VARCHAR},
c_name = #{record.cName,jdbcType=VARCHAR},
path = #{record.path,jdbcType=VARCHAR},
type = #{record.type,jdbcType=INTEGER},
status = #{record.status,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Menu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
update wb_menu
<set >
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=VARCHAR},
</if>
<if test="icon != null" >
icon = #{icon,jdbcType=VARCHAR},
</if>
<if test="eName != null" >
e_name = #{eName,jdbcType=VARCHAR},
</if>
<if test="cName != null" >
c_name = #{cName,jdbcType=VARCHAR},
</if>
<if test="path != null" >
path = #{path,jdbcType=VARCHAR},
</if>
<if test="type != null" >
type = #{type,jdbcType=INTEGER},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.Menu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Wed May 27 14:31:46 CST 2020.
-->
update wb_menu
set parent_id = #{parentId,jdbcType=VARCHAR},
icon = #{icon,jdbcType=VARCHAR},
e_name = #{eName,jdbcType=VARCHAR},
c_name = #{cName,jdbcType=VARCHAR},
path = #{path,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</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.boco.nbd.wios.flow.mapper.def.NodeMapper">
<!--获取节点配置的用户组 -->
<select id="getNodeGroupsInfo" parameterType="Long"
resultType="com.boco.nbd.wios.flow.entity.bo.NodeGroupBO">
SELECT
a.flow_id,
a.flow_code,
b.node_id,
b.node_code,
b.node_name,
d.group_id,
d.group_name
FROM
tv3_lug_groups d
left join tv3_lug_node_group c on c.group_id = d.group_id
left join tv3_lug_nodes b on b.node_id = c.node_id
<if test="nodeId !=null">
AND b.node_id = #{nodeId}
</if>
left join tv3_lug_flows a on a.flow_id = b.flow_id
WHERE 1 = 1
<if test="nodeId !=null">
AND b.node_id = #{nodeId}
</if>
ORDER BY b.node_id
</select>
<!-- 解除节点和组的关系 -->
<delete id="deleteGroupNode">
delete
from tv3_lug_node_group
where node_id = #{nodeId}
</delete>
<!-- 绑定节点和组 -->
<select id="bindGroupNode" resultType="Integer">
insert into tv3_lug_node_group
(node_id, group_id)
values (#{nodeId}, #{groupId})
</select>
<select id="selectByFlowIdAndNodeCode" resultType="com.boco.nbd.wios.flow.entity.po.FlowNodePO">
select a.flow_id,
a.category_name,
a.flow_code,
a.flow_name,
b.node_id,
b.node_code,
b.node_name
from tv3_lug_flows a,
tv3_lug_nodes b
where a.flow_id = b.flow_id
<if test="flowCode !=null">
AND b.flow_code = #{flowCode}
</if>
<if test="nodeCode !=null">
and node_code = #{nodeCode}
</if>
</select>
<!-- 据组ID删除成员 -->
<delete id="deleteGroupUser">
delete
from tv3_lug_group_user
where group_id = #{groupId}
</delete>
<insert id="bindGroupUser">
insert into tv3_lug_group_user (group_id, user_id)
values (#{groupId}, #{userId})
</insert>
<select id="getRoles">
select a.id role_id, a.name role_name
from wb_role a
where a.status = 1
order by a.id
</select>
<!--主机厂加载CAMS用户
select b.type vendor_type, a.id user_id,b.id vendor_id,b.name vendor_name from wb_account a
inner join t_oem b on (a.parent_id=b.wb_account_id or a.id=b.wb_account_id)
inner join t_oem_contract c on b.id = c.oem_id and c.status = 2
union all
-->
<select id="loadUsers" resultType="com.boco.nbd.wios.flow.entity.po.UserPO">
select a.*,b.name user_name,b.phone, d.id role_id, d.name role_name from
(
select 0 vendor_type,a.id user_id,-1 vendor_id,'CAMS' vendor_name from wb_account a where a.parent_id is null
union all
select 0 vendor_type,a.id user_id,-1 vendor_id,'CAMS' vendor_name from wb_account a
inner join t_cams_account b on a.id=b.account_id
union all
select 3 vendor_type,a.id user_id,c.id vendor_id,c.name vendor_id
from wb_account a
inner join t_supplier c on (c.account_id=a.id or c.account_id=a.parent_id)) a
inner join wb_account b on a.user_id=b.id
inner join wb_account_role c on c.account_id=b.id
inner join wb_role d on c.role_id=d.id
where b.status = 1
<if test="vendorId != null and vendorId!=0">
and (a.vendor_id=#{vendorId} or (a.vendor_id=-1 and exists(select 1 from t_oem where id=#{vendorId})))
</if>
order by a.vendor_type
</select>
<!--主机厂加载CAMS用户
union all
select b.type vendor_type,a.id user_id,b.id vendor_id,b.name vendor_name from wb_account a
inner join t_oem b on (a.parent_id=b.wb_account_id or a.id=b.wb_account_id)
inner join t_oem_contract c on b.id = c.oem_id and c.status = 2
-->
<select id="getUserByGroup" parameterType="java.lang.Long" resultType="com.boco.nbd.wios.flow.entity.po.UserPO">
select a.*,b.name user_name,b.phone, d.id role_id, d.name role_name,e.group_id from
(
select 0 vendor_type,a.id user_id,-1 vendor_id,'CAMS' vendor_name from wb_account a where a.parent_id is null
union all
select 0 vendor_type,a.id user_id,-1 vendor_id,'CAMS' vendor_name from wb_account a
inner join t_cams_account b on a.id=b.account_id
union all
select 3 vendor_type,a.id user_id,c.id vendor_id,c.name vendor_id
from wb_account a
inner join t_supplier c on (c.account_id=a.id or c.account_id=a.parent_id)) a
inner join wb_account b on a.user_id=b.id
inner join wb_account_role c on c.account_id=b.id
inner join wb_role d on c.role_id=d.id
inner join tv3_lug_groups f on (f.vendor_id=a.vendor_id or (a.vendor_id =-1 and exists(select 1 from t_oem where
id=f.vendor_id)))
left join tv3_lug_group_user e on b.id = e.user_id and f.group_id=e.group_id
where b.status = 1
<if test="groupId != null">
and f.group_id = #{groupId}
</if>
order by a.vendor_type
</select>
<select id="getSuperUserByGroup" parameterType="java.lang.Long"
resultType="com.boco.nbd.wios.flow.entity.po.BaseUserPO">
select c.id, c.phone
from wb_account c
inner join tv3_lug_group_user d on c.id = d.user_id and d.group_id = #{groupId}
where c.status = 1
</select>
<select id="getSelectVendorInfo" resultType="com.boco.nbd.wios.flow.entity.po.VendorPO">
select distinct a.id vendor_id, a.name vendor_name
from t_oem a
inner join t_oem_contract b on a.id = b.oem_id and b.status = 2
where type = 1
and a.status = 1
union all
select id vendor_id, name vendor_name
from t_supplier
</select>
<select id="getFlowNodeUserInfo" parameterType="com.boco.nbd.wios.flow.entity.qo.FlowNodeUserQo"
resultType="com.boco.nbd.wios.flow.entity.po.FlowNodeUserPO">
select a.flow_code, b.node_code, d.group_name, d.vendor_name, e.user_id, f.name user_name,f.phone
from tv3_lug_flows a
inner join tv3_lug_nodes b on a.flow_id = b.flow_id
inner join tv3_lug_node_group c on b.node_id = c.node_id
inner join tv3_lug_groups d on c.group_id = d.group_id
inner join tv3_lug_group_user e on d.group_id = e.group_id
inner join wb_account f on e.user_id = f.id
where 1=1
and a.flow_code=#{flowCode}
<if test="nodeCode != null">
and b.node_code=#{nodeCode}
</if>
<if test="vendorId != null">
and d.vendor_id=#{vendorId}
</if>
<if test="userName != null and userName != ''">
<bind name="userNameLike" value="'%' + userName + '%'"/>
and f.name like #{userNameLike}
</if>
</select>
<!-- 据组ID删除成员 -->
<delete id="deleteConnectConfig">
delete
from t_connect_order_config
where group_id = #{groupId}
and user_id = #{userId}
</delete>
<insert id="bindConnectConfig">
insert into t_connect_order_config (group_id, user_id, end_number)
values (#{groupId}, #{userId}, #{endNumber})
</insert>
<select id="getConnectConfig" resultType="com.boco.nbd.wios.flow.entity.bo.ConnectConfigBO">
select d.vendor_id,
d.vendor_name,
d.group_id,
d.group_name,
e.user_id,
f.name user_name,
g.end_number
from tv3_lug_flows a
inner join tv3_lug_nodes b on a.flow_id = b.flow_id
inner join tv3_lug_node_group c on b.node_id = c.node_id
inner join tv3_lug_groups d on c.group_id = d.group_id
inner join tv3_lug_group_user e on d.group_id = e.group_id
inner join wb_account f on e.user_id = f.id
left join t_connect_order_config g on g.group_id = e.group_id and g.user_id = e.user_id
where a.flow_code = #{flowCode}
and b.node_code = #{nodeCode}
<if test="vendorId != null">
and d.vendor_id = #{vendorId}
</if>
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.OemCascadeMapper">
<resultMap id="oemCascadeMap" type="com.boco.nbd.wios.flow.entity.po.OemCascadePO">
<result column="id" property="id"/>
<result column="name" property="name"/>
<result column="parent_id" property="parentId"/>
<result column="materials_code" property="materialsCode"/>
</resultMap>
<select id="getCascadePO" parameterType="string" resultMap="oemCascadeMap">
select id,name,materials_code,parent_id from t_oem_cascade
where 1=1
<if test="oemId != null">
and find_in_set(parent_id,#{oemId})
</if>
</select>
<select id="getCascadeById" parameterType="string" resultMap="oemCascadeMap">
select id, name, materials_code, parent_id
from t_oem_cascade
where id = #{id}
</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.boco.nbd.wios.manage.mapper.def.OemContractItemMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OemContractItem">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="contract_id" jdbcType="VARCHAR" property="contractId" />
<result column="item_id" jdbcType="VARCHAR" property="itemId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="rate_price" jdbcType="DECIMAL" property="ratePrice" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, contract_id, item_id, type, price, tax_rate, rate_price, description, create_account,
create_time, modify_account, modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_oem_contract_item
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContractItem">
insert into t_oem_contract_item (id, contract_id, item_id,
type, price, tax_rate,
rate_price, description, create_account,
create_time, modify_account, modify_time
)
values (#{id,jdbcType=INTEGER}, #{contractId,jdbcType=VARCHAR}, #{itemId,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{taxRate,jdbcType=DECIMAL},
#{ratePrice,jdbcType=DECIMAL}, #{description,jdbcType=VARCHAR}, #{createAccount,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContractItem">
insert into t_oem_contract_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="contractId != null">
contract_id,
</if>
<if test="itemId != null">
item_id,
</if>
<if test="type != null">
type,
</if>
<if test="price != null">
price,
</if>
<if test="taxRate != null">
tax_rate,
</if>
<if test="ratePrice != null">
rate_price,
</if>
<if test="description != null">
description,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="contractId != null">
#{contractId,jdbcType=VARCHAR},
</if>
<if test="itemId != null">
#{itemId,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
<if test="taxRate != null">
#{taxRate,jdbcType=DECIMAL},
</if>
<if test="ratePrice != null">
#{ratePrice,jdbcType=DECIMAL},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContractItem">
update t_oem_contract_item
<set>
<if test="contractId != null">
contract_id = #{contractId,jdbcType=VARCHAR},
</if>
<if test="itemId != null">
item_id = #{itemId,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
<if test="taxRate != null">
tax_rate = #{taxRate,jdbcType=DECIMAL},
</if>
<if test="ratePrice != null">
rate_price = #{ratePrice,jdbcType=DECIMAL},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContractItem">
update t_oem_contract_item
set contract_id = #{contractId,jdbcType=VARCHAR},
item_id = #{itemId,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
price = #{price,jdbcType=DECIMAL},
tax_rate = #{taxRate,jdbcType=DECIMAL},
rate_price = #{ratePrice,jdbcType=DECIMAL},
description = #{description,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_oem_contract_item
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByContractId" parameterType="java.lang.Integer" resultType="com.boco.nbd.wios.manage.entity.bo.OemContractItemVo">
select t.*
from t_oem_contract_item t
where t.contract_id = #{contractId,jdbcType=INTEGER}
</select>
<select id="selectByContractIdAndItemId" resultType="com.boco.nbd.wios.manage.entity.bo.OemContractItemVo">
select t.*
from t_oem_contract_item t
where t.contract_id = #{contractId} and t.item_id=#{itemId}
</select>
<select id="selectPureByContractId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select t.*
from t_oem_contract_item t
where t.contract_id = #{contractId,jdbcType=INTEGER}
</select>
<select id="selectByItemId" parameterType="java.lang.String" resultMap="BaseResultMap">
select t.*
from t_oem_contract_item t
where t.item_id = #{itemId}
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_oem_contract_item (id, contract_id, item_id,
type, price, tax_rate,
rate_price, description, create_account,
create_time, modify_account, modify_time
)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.contractId,jdbcType=VARCHAR}, #{item.itemId,jdbcType=VARCHAR},
#{item.type,jdbcType=VARCHAR}, #{item.price,jdbcType=DECIMAL}, #{item.taxRate,jdbcType=DECIMAL},
#{item.ratePrice,jdbcType=DECIMAL}, #{item.description,jdbcType=VARCHAR}, #{item.createAccount,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.modifyAccount,jdbcType=VARCHAR}, #{item.modifyTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<delete id="deleteByContractId" parameterType="java.lang.Integer">
delete from t_oem_contract_item
where contract_id = #{contractId}
</delete>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.OemContractMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OemContract">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="oem_id" jdbcType="VARCHAR" property="oemId" />
<result column="device_settlement_id" jdbcType="VARCHAR" property="deviceSettlementId" />
<result column="install_settlement_id" jdbcType="VARCHAR" property="installSettlementId" />
<result column="region_id" jdbcType="VARCHAR" property="regionId" />
<result column="start_time" jdbcType="DATE" property="startTime" />
<result column="end_time" jdbcType="DATE" property="endTime" />
<result column="sale_account" jdbcType="VARCHAR" property="saleAccount" />
<result column="settle_interval" jdbcType="INTEGER" property="settleInterval" />
<result column="business_type" jdbcType="INTEGER" property="businessType" />
<result column="standard_length" jdbcType="DECIMAL" property="standardLength" />
<result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="guarantee_period" jdbcType="INTEGER" property="guaranteePeriod" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="file_id" jdbcType="VARCHAR" property="fileId" />
<result column="cams_device_enable" jdbcType="INTEGER" property="camsDeviceEnable" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, code, oem_id, device_settlement_id, install_settlement_id, region_id, start_time,
end_time, sale_account, settle_interval, business_type, standard_length, tax_rate,
guarantee_period, status, description, file_id, cams_device_enable, create_account,
create_time, modify_account, modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_oem_contract
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContract"
useGeneratedKeys="true" keyProperty="id">
insert into t_oem_contract (id, code, oem_id,
device_settlement_id, install_settlement_id,
region_id, start_time, end_time,
sale_account, settle_interval, business_type,
standard_length, tax_rate, guarantee_period,
status, description, file_id,
cams_device_enable, create_account, create_time,
modify_account, modify_time)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{oemId,jdbcType=VARCHAR},
#{deviceSettlementId,jdbcType=VARCHAR}, #{installSettlementId,jdbcType=VARCHAR},
#{regionId,jdbcType=VARCHAR}, #{startTime,jdbcType=DATE}, #{endTime,jdbcType=DATE},
#{saleAccount,jdbcType=VARCHAR}, #{settleInterval,jdbcType=INTEGER}, #{businessType,jdbcType=INTEGER},
#{standardLength,jdbcType=DECIMAL}, #{taxRate,jdbcType=DECIMAL}, #{guaranteePeriod,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR},
#{camsDeviceEnable,jdbcType=INTEGER}, #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContract">
insert into t_oem_contract
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="oemId != null">
oem_id,
</if>
<if test="deviceSettlementId != null">
device_settlement_id,
</if>
<if test="installSettlementId != null">
install_settlement_id,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="saleAccount != null">
sale_account,
</if>
<if test="settleInterval != null">
settle_interval,
</if>
<if test="businessType != null">
business_type,
</if>
<if test="standardLength != null">
standard_length,
</if>
<if test="taxRate != null">
tax_rate,
</if>
<if test="guaranteePeriod != null">
guarantee_period,
</if>
<if test="status != null">
status,
</if>
<if test="description != null">
description,
</if>
<if test="fileId != null">
file_id,
</if>
<if test="camsDeviceEnable != null">
cams_device_enable,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="oemId != null">
#{oemId,jdbcType=VARCHAR},
</if>
<if test="deviceSettlementId != null">
#{deviceSettlementId,jdbcType=VARCHAR},
</if>
<if test="installSettlementId != null">
#{installSettlementId,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
#{regionId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
#{startTime,jdbcType=DATE},
</if>
<if test="endTime != null">
#{endTime,jdbcType=DATE},
</if>
<if test="saleAccount != null">
#{saleAccount,jdbcType=VARCHAR},
</if>
<if test="settleInterval != null">
#{settleInterval,jdbcType=INTEGER},
</if>
<if test="businessType != null">
#{businessType,jdbcType=INTEGER},
</if>
<if test="standardLength != null">
#{standardLength,jdbcType=DECIMAL},
</if>
<if test="taxRate != null">
#{taxRate,jdbcType=DECIMAL},
</if>
<if test="guaranteePeriod != null">
#{guaranteePeriod,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="fileId != null">
#{fileId,jdbcType=VARCHAR},
</if>
<if test="camsDeviceEnable != null">
#{camsDeviceEnable,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContract">
update t_oem_contract
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="oemId != null">
oem_id = #{oemId,jdbcType=VARCHAR},
</if>
<if test="deviceSettlementId != null">
device_settlement_id = #{deviceSettlementId,jdbcType=VARCHAR},
</if>
<if test="installSettlementId != null">
install_settlement_id = #{installSettlementId,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=VARCHAR},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=DATE},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=DATE},
</if>
<if test="saleAccount != null">
sale_account = #{saleAccount,jdbcType=VARCHAR},
</if>
<if test="settleInterval != null">
settle_interval = #{settleInterval,jdbcType=INTEGER},
</if>
<if test="businessType != null">
business_type = #{businessType,jdbcType=INTEGER},
</if>
<if test="standardLength != null">
standard_length = #{standardLength,jdbcType=DECIMAL},
</if>
<if test="taxRate != null">
tax_rate = #{taxRate,jdbcType=DECIMAL},
</if>
<if test="guaranteePeriod != null">
guarantee_period = #{guaranteePeriod,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="fileId != null">
file_id = #{fileId,jdbcType=VARCHAR},
</if>
<if test="camsDeviceEnable != null">
cams_device_enable = #{camsDeviceEnable,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContract">
update t_oem_contract
set code = #{code,jdbcType=VARCHAR},
oem_id = #{oemId,jdbcType=VARCHAR},
device_settlement_id = #{deviceSettlementId,jdbcType=VARCHAR},
install_settlement_id = #{installSettlementId,jdbcType=VARCHAR},
region_id = #{regionId,jdbcType=VARCHAR},
start_time = #{startTime,jdbcType=DATE},
end_time = #{endTime,jdbcType=DATE},
sale_account = #{saleAccount,jdbcType=VARCHAR},
settle_interval = #{settleInterval,jdbcType=INTEGER},
business_type = #{businessType,jdbcType=INTEGER},
standard_length = #{standardLength,jdbcType=DECIMAL},
tax_rate = #{taxRate,jdbcType=DECIMAL},
guarantee_period = #{guaranteePeriod,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
description = #{description,jdbcType=VARCHAR},
file_id = #{fileId,jdbcType=VARCHAR},
cams_device_enable = #{camsDeviceEnable,jdbcType=INTEGER},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_oem_contract
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_oem_contract
where code = #{code}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContractBo2"
resultType="com.boco.nbd.wios.manage.entity.bo.OemContractVo">
select tt.*,count(tt.orderId) as orderQuantity from
(
select t.*,o.name as oemName,o1.name as deviceSettlementName,
o2.name as installSettlementName,
ord.id as orderId
from t_oem_contract t
left join t_oem o on o.id=t.oem_id
left join t_oem o1 on o1.id=t.device_settlement_id
left join t_oem o2 on o2.id=t.install_settlement_Id
left JOIN t_order ord ON t.oem_id = ord.oem_id
<where>
<if test="oemId != null and oemId != ''">
and t.oem_id = #{oemId}
</if>
<if test="oemName != null and oemName != ''">
<bind name="oemNameLike" value="'%' + oemName + '%'"/>
and o.name like #{oemNameLike}
</if>
<if test="code != null and code != ''">
<bind name="codeLike" value="'%' + code + '%'"/>
and t.code like #{codeLike}
</if>
<if test="saleAccount != null and saleAccount != ''">
<bind name="saleAccountLike" value="'%' + saleAccount + '%'"/>
and t.sale_account like #{saleAccountLike}
</if>
<if test="deviceSettlementName != null and deviceSettlementName != ''">
<bind name="deviceSettlementNameLike" value="'%' + deviceSettlementName + '%'"/>
and o1.name like #{deviceSettlementNameLike}
</if>
<if test="installSettlementName != null and installSettlementName != ''">
<bind name="installSettlementNameLike" value="'%' + installSettlementName + '%'"/>
and o2.name like #{installSettlementNameLike}
</if>
<if test="guaranteePeriod != null">
and t.guarantee_period = #{guaranteePeriod}
</if>
<if test="status != null">
and t.status = #{status}
</if>
<if test="statusInList != null">
and t.status in
<foreach collection="statusInList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="startTimeOrigin != null and startTimeOrigin != ''">
and t.start_time &lt;= #{startTimeOrigin}
</if>
<if test="startTimeTeminal != null and startTimeTeminal != ''">
and t.start_time &gt;= #{startTimeTeminal}
</if>
<if test="endTimeOrigin != null and endTimeOrigin != ''">
and t.end_time &lt;= #{endTimeOrigin}
</if>
<if test="endTimeTeminal != null and endTimeTeminal != ''">
and t.end_time &gt;= #{endTimeTeminal}
</if>
</where>
) as tt
GROUP BY tt.id
<choose>
<when test="orderBy != null and orderBy==2">
order by tt.end_time desc
</when>
<otherwise>
order by tt.create_time desc
</otherwise>
</choose>
</select>
<select id="selectDetailById" parameterType="java.lang.Integer" resultType="com.boco.nbd.wios.manage.entity.bo.OemContractVo">
select t.*,
o.name as oemName,
o.code as oemCode,
o1.name as deviceSettlementName,
o2.name as installSettlementName
from t_oem_contract t
left join t_oem o on o.id=t.oem_id
left join t_oem o1 on o1.id=t.device_settlement_id
left join t_oem o2 on o2.id=t.install_settlement_Id
where t.id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByStatusAndOemId" resultMap="BaseResultMap">
select t.*
from t_oem_contract t
where t.oem_id = #{oemId} and t.status = #{status}
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.OemContractPriceMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OemContractPrice">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="contract_id" jdbcType="INTEGER" property="contractId" />
<result column="region_id" jdbcType="VARCHAR" property="regionId" />
<result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="survey_price" jdbcType="DECIMAL" property="surveyPrice" />
<result column="survey_rate_price" jdbcType="DECIMAL" property="surveyRatePrice" />
<result column="installation_price" jdbcType="DECIMAL" property="installationPrice" />
<result column="installation_rate_price" jdbcType="DECIMAL" property="installationRatePrice" />
<result column="expand_price" jdbcType="DECIMAL" property="expandPrice" />
<result column="expand_rate_price" jdbcType="DECIMAL" property="expandRatePrice" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, contract_id, region_id, tax_rate, survey_price, survey_rate_price, installation_price,
installation_rate_price, expand_price, expand_rate_price, description, create_account,
create_time, modify_account, modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_oem_contract_price
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContractPrice">
insert into t_oem_contract_price (id, contract_id, region_id,
tax_rate, survey_price, survey_rate_price,
installation_price, installation_rate_price,
expand_price, expand_rate_price, description,
create_account, create_time, modify_account,
modify_time)
values (#{id,jdbcType=INTEGER}, #{contractId,jdbcType=INTEGER}, #{regionId,jdbcType=VARCHAR},
#{taxRate,jdbcType=DECIMAL}, #{surveyPrice,jdbcType=DECIMAL}, #{surveyRatePrice,jdbcType=DECIMAL},
#{installationPrice,jdbcType=DECIMAL}, #{installationRatePrice,jdbcType=DECIMAL},
#{expandPrice,jdbcType=DECIMAL}, #{expandRatePrice,jdbcType=DECIMAL}, #{description,jdbcType=VARCHAR},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContractPrice">
insert into t_oem_contract_price
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="contractId != null">
contract_id,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="taxRate != null">
tax_rate,
</if>
<if test="surveyPrice != null">
survey_price,
</if>
<if test="surveyRatePrice != null">
survey_rate_price,
</if>
<if test="installationPrice != null">
installation_price,
</if>
<if test="installationRatePrice != null">
installation_rate_price,
</if>
<if test="expandPrice != null">
expand_price,
</if>
<if test="expandRatePrice != null">
expand_rate_price,
</if>
<if test="description != null">
description,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="contractId != null">
#{contractId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
#{regionId,jdbcType=VARCHAR},
</if>
<if test="taxRate != null">
#{taxRate,jdbcType=DECIMAL},
</if>
<if test="surveyPrice != null">
#{surveyPrice,jdbcType=DECIMAL},
</if>
<if test="surveyRatePrice != null">
#{surveyRatePrice,jdbcType=DECIMAL},
</if>
<if test="installationPrice != null">
#{installationPrice,jdbcType=DECIMAL},
</if>
<if test="installationRatePrice != null">
#{installationRatePrice,jdbcType=DECIMAL},
</if>
<if test="expandPrice != null">
#{expandPrice,jdbcType=DECIMAL},
</if>
<if test="expandRatePrice != null">
#{expandRatePrice,jdbcType=DECIMAL},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContractPrice">
update t_oem_contract_price
<set>
<if test="contractId != null">
contract_id = #{contractId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=VARCHAR},
</if>
<if test="taxRate != null">
tax_rate = #{taxRate,jdbcType=DECIMAL},
</if>
<if test="surveyPrice != null">
survey_price = #{surveyPrice,jdbcType=DECIMAL},
</if>
<if test="surveyRatePrice != null">
survey_rate_price = #{surveyRatePrice,jdbcType=DECIMAL},
</if>
<if test="installationPrice != null">
installation_price = #{installationPrice,jdbcType=DECIMAL},
</if>
<if test="installationRatePrice != null">
installation_rate_price = #{installationRatePrice,jdbcType=DECIMAL},
</if>
<if test="expandPrice != null">
expand_price = #{expandPrice,jdbcType=DECIMAL},
</if>
<if test="expandRatePrice != null">
expand_rate_price = #{expandRatePrice,jdbcType=DECIMAL},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.OemContractPrice">
update t_oem_contract_price
set contract_id = #{contractId,jdbcType=INTEGER},
region_id = #{regionId,jdbcType=VARCHAR},
tax_rate = #{taxRate,jdbcType=DECIMAL},
survey_price = #{surveyPrice,jdbcType=DECIMAL},
survey_rate_price = #{surveyRatePrice,jdbcType=DECIMAL},
installation_price = #{installationPrice,jdbcType=DECIMAL},
installation_rate_price = #{installationRatePrice,jdbcType=DECIMAL},
expand_price = #{expandPrice,jdbcType=DECIMAL},
expand_rate_price = #{expandRatePrice,jdbcType=DECIMAL},
description = #{description,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_oem_contract_price
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByContractId" parameterType="java.lang.Integer" resultType="com.boco.nbd.wios.manage.entity.bo.OemContractPriceVo">
SELECT
t.*, r. NAME AS regionName,
r.id_tree AS regionIdTree,
a.name packTypeName
FROM
t_oem_contract_price t
LEFT JOIN t_region r ON r.id = t.region_id
left join t_oem_cascade a on t.pack_type=a.id
WHERE
t.contract_id = #{contractId}
</select>
<select id="selectPureByContractId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select t.*
from t_oem_contract_price t
where t.contract_id = #{contractId,jdbcType=INTEGER}
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_oem_contract_price (id, contract_id, region_id, pack_type,
tax_rate, survey_price, survey_rate_price,
installation_price, installation_rate_price,
expand_price, expand_rate_price, description,
create_account, create_time, modify_account,
modify_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.contractId,jdbcType=INTEGER}, #{item.regionId,jdbcType=VARCHAR}, #{item.packType,jdbcType=VARCHAR},
#{item.taxRate,jdbcType=DECIMAL}, #{item.surveyPrice,jdbcType=DECIMAL}, #{item.surveyRatePrice,jdbcType=DECIMAL},
#{item.installationPrice,jdbcType=DECIMAL}, #{item.installationRatePrice,jdbcType=DECIMAL},
#{item.expandPrice,jdbcType=DECIMAL}, #{item.expandRatePrice,jdbcType=DECIMAL}, #{item.description,jdbcType=VARCHAR},
#{item.createAccount,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.modifyAccount,jdbcType=VARCHAR},
#{item.modifyTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
<delete id="deleteByContractId" parameterType="java.lang.Integer">
delete from t_oem_contract_price
where contract_id = #{contractId}
</delete>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.OemMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Oem">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="short_name" jdbcType="VARCHAR" property="shortName" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="wb_account_id" jdbcType="INTEGER" property="wbAccountId" />
<result column="region_id" jdbcType="INTEGER" property="regionId" />
<result column="manual_dispatch_order" jdbcType="INTEGER" property="manualDispatchOrder" />
<result column="organization_code" jdbcType="VARCHAR" property="organizationCode" />
<result column="contact_name" jdbcType="VARCHAR" property="contactName" />
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="file_id" jdbcType="VARCHAR" property="fileId" />
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, code, short_name, name, status, type, wb_account_id, region_id, manual_dispatch_order,
organization_code, contact_name, contact_phone, address, file_id, parent_id, description,
create_account, create_time, modify_account, modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_oem
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Oem">
insert into t_oem (id, code, short_name,
name, status, type,
wb_account_id, region_id, manual_dispatch_order,
organization_code, contact_name, contact_phone,
address, file_id, parent_id,
description, create_account, create_time,
modify_account, modify_time)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{shortName,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
#{wbAccountId,jdbcType=INTEGER}, #{regionId,jdbcType=INTEGER}, #{manualDispatchOrder,jdbcType=INTEGER},
#{organizationCode,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{fileId,jdbcType=VARCHAR}, #{parentId,jdbcType=INTEGER},
#{description,jdbcType=VARCHAR}, #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Oem">
insert into t_oem
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="shortName != null">
short_name,
</if>
<if test="name != null">
name,
</if>
<if test="status != null">
status,
</if>
<if test="type != null">
type,
</if>
<if test="wbAccountId != null">
wb_account_id,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="manualDispatchOrder != null">
manual_dispatch_order,
</if>
<if test="organizationCode != null">
organization_code,
</if>
<if test="contactName != null">
contact_name,
</if>
<if test="contactPhone != null">
contact_phone,
</if>
<if test="address != null">
address,
</if>
<if test="fileId != null">
file_id,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="description != null">
description,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="shortName != null">
#{shortName,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="wbAccountId != null">
#{wbAccountId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
#{regionId,jdbcType=INTEGER},
</if>
<if test="manualDispatchOrder != null">
#{manualDispatchOrder,jdbcType=INTEGER},
</if>
<if test="organizationCode != null">
#{organizationCode,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
#{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
#{contactPhone,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="fileId != null">
#{fileId,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
#{parentId,jdbcType=INTEGER},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Oem">
update t_oem
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="shortName != null">
short_name = #{shortName,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="wbAccountId != null">
wb_account_id = #{wbAccountId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=INTEGER},
</if>
<if test="manualDispatchOrder != null">
manual_dispatch_order = #{manualDispatchOrder,jdbcType=INTEGER},
</if>
<if test="organizationCode != null">
organization_code = #{organizationCode,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
contact_phone = #{contactPhone,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="fileId != null">
file_id = #{fileId,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.Oem">
update t_oem
set code = #{code,jdbcType=VARCHAR},
short_name = #{shortName,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
wb_account_id = #{wbAccountId,jdbcType=INTEGER},
region_id = #{regionId,jdbcType=INTEGER},
manual_dispatch_order = #{manualDispatchOrder,jdbcType=INTEGER},
organization_code = #{organizationCode,jdbcType=VARCHAR},
contact_name = #{contactName,jdbcType=VARCHAR},
contact_phone = #{contactPhone,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
file_id = #{fileId,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
description = #{description,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_oem
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectSelfAndChildren" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select *
from t_oem
where id = #{id} or parent_id=#{id}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.OemBo"
resultType="com.boco.nbd.wios.manage.entity.bo.OemVo">
<if test="hasContract != null"><!-- 是否签了合同 -->
select tt.* from
(
</if>
select oem.*,
<if test="type != null and type == 2"><!-- 经销商 -->
po.name as parentOemName,
</if>
<if test="hasContract != null"><!-- 是否签了合同 -->
oc.id as validContractId,
</if>
a.account as accountName from t_oem oem
left join wb_account a on a.id=oem.wb_account_id
<if test="type != null and type == 2"><!-- 经销商 -->
left join t_oem po on po.id=oem.parent_id
</if>
<if test="hasContract != null"><!-- 是否签了合同 -->
left join t_oem_contract oc on oc.oem_id=oem.id
<if test="hasContract == 1">
and oc.status=2
</if>
</if>
<where>
<if test="id != null">
and oem.id = #{id}
</if>
<if test="idAndPId != null">
and (oem.id = #{idAndPId} or oem.parent_id=#{idAndPId})
</if>
<if test="code != null and code !=''">
<bind name="codeLike" value="'%' + code + '%'"/>
and oem.code like #{codeLike}
</if>
<if test="name != null and name != ''">
<bind name="nameLike" value="'%' + name + '%'"/>
and oem.name like #{nameLike}
</if>
<if test="type != null">
and oem.type = #{type}
</if>
<if test="status != null">
and oem.status = #{status}
</if>
<if test="organizationCode != null and organizationCode != ''">
<bind name="organizationCodeLike" value="'%' + organizationCode + '%'"/>
and oem.organization_code like #{organizationCodeLike}
</if>
<if test="regionId != null">
and oem.region_id = #{regionId}
</if>
<if test="parentId != null">
and oem.parent_id = #{parentId}
</if>
</where>
order by oem.create_time desc
<if test="hasContract != null"><!-- 是否签了合同 -->
) as tt
</if>
<if test="hasContract != null and hasContract==0"><!-- 未签合同 -->
where tt.validContractId is null
group by tt.id
</if>
<if test="hasContract != null and hasContract!=0"><!-- 签了合同 -->
where tt.validContractId is not null
group by tt.id
</if>
</select>
<select id="selectOnly" resultType="com.boco.nbd.wios.manage.entity.bo.Oem">
select * from t_oem
<where>
<if test="code != null and code !=''">
or code = #{code}
</if>
<if test="name != null and name != ''">
or name = #{name}
</if>
</where>
</select>
<select id="selectByName" parameterType="java.lang.String" resultMap="BaseResultMap">
select *
from t_oem
where name = #{name} and status = 1
</select>
<select id="selectByNameAndCode" resultMap="BaseResultMap">
select * from t_oem
<where>
status = 1
<if test="code != null and code !=''">
and code = #{code}
</if>
<if test="name != null and name != ''">
and name = #{name}
</if>
</where>
</select>
<select id="selectByAccountId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select *
from t_oem
where wb_account_id = #{accountId} and status = 1
</select>
<select id="selectAll" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from t_oem
<where>
<if test="status != null">
and status = #{status}
</if>
</where>
</select>
<select id="selectAllOem" resultType="com.boco.nbd.wios.manage.entity.bo.Oem">
select DISTINCT a.id,a.name,a.code,a.short_name shortName from t_oem a
inner join t_oem_contract b on a.id=b.oem_id and b.status=2
where type=1 and a.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.boco.nbd.wios.manage.mapper.def.OperateLogDeleteMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OperateLogDelete" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="TINYINT" />
<result column="third_party_id" property="thirdPartyId" jdbcType="VARCHAR" />
<result column="pre_name" property="preName" jdbcType="VARCHAR" />
<result column="pre_value" property="preValue" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="value" property="value" jdbcType="VARCHAR" />
<result column="desc" property="desc" jdbcType="VARCHAR" />
<result column="create_account" property="createAccount" jdbcType="INTEGER" />
<result column="create_account_name" property="createAccountName" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, type, third_party_id, pre_name, pre_value, name, value, desc, create_account,
create_account_name, create_time
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OperateLogDelete" >
insert into t_operate_log_delete (id, type, third_party_id,
pre_name, pre_value, name,
value, desc, create_account,
create_account_name, create_time)
values (#{id,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, #{thirdPartyId,jdbcType=VARCHAR},
#{preName,jdbcType=VARCHAR}, #{preValue,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{createAccount,jdbcType=INTEGER},
#{createAccountName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.OperateLogDelete" >
insert into t_operate_log_delete
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="type != null" >
type,
</if>
<if test="thirdPartyId != null" >
third_party_id,
</if>
<if test="preName != null" >
pre_name,
</if>
<if test="preValue != null" >
pre_value,
</if>
<if test="name != null" >
name,
</if>
<if test="value != null" >
value,
</if>
<if test="desc != null" >
desc,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="createAccountName != null" >
create_account_name,
</if>
<if test="createTime != null" >
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="type != null" >
#{type,jdbcType=TINYINT},
</if>
<if test="thirdPartyId != null" >
#{thirdPartyId,jdbcType=VARCHAR},
</if>
<if test="preName != null" >
#{preName,jdbcType=VARCHAR},
</if>
<if test="preValue != null" >
#{preValue,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="value != null" >
#{value,jdbcType=VARCHAR},
</if>
<if test="desc != null" >
#{desc,jdbcType=VARCHAR},
</if>
<if test="createAccount != null" >
#{createAccount,jdbcType=INTEGER},
</if>
<if test="createAccountName != null" >
#{createAccountName,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<insert id="batchInsert">
insert into t_operate_log_delete ( type, third_party_id,
pre_name, pre_value, name,
value, `desc`, create_account,
create_account_name, create_time)
values
<foreach collection="list" item="item" separator=",">
( #{item.type,jdbcType=TINYINT}, #{item.thirdPartyId,jdbcType=VARCHAR},
#{item.preName,jdbcType=VARCHAR}, #{item.preValue,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR},
#{item.value,jdbcType=VARCHAR}, #{item.desc,jdbcType=VARCHAR}, #{item.createAccount,jdbcType=INTEGER},
#{item.createAccountName,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.OperateLogMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OperateLog">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="third_party_id" jdbcType="VARCHAR" property="thirdPartyId" />
<result column="pre_name" jdbcType="VARCHAR" property="preName" />
<result column="pre_value" jdbcType="VARCHAR" property="preValue" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="value" jdbcType="VARCHAR" property="value" />
<result column="desc" jdbcType="VARCHAR" property="desc" />
<result column="create_account" jdbcType="INTEGER" property="createAccount" />
<result column="create_account_name" jdbcType="VARCHAR" property="createAccountName" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, type, third_party_id, pre_name, pre_value, name, value, `desc`, create_account,
create_account_name, create_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_operate_log
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByOrderId">
delete from t_operate_log
where third_party_id = #{orderId}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OperateLog">
insert into t_operate_log (id, type, third_party_id,
pre_name, pre_value, name,
value, `desc`, create_account,
create_account_name, create_time)
values (#{id,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{thirdPartyId,jdbcType=VARCHAR},
#{preName,jdbcType=VARCHAR}, #{preValue,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{value,jdbcType=VARCHAR}, #{desc,jdbcType=VARCHAR}, #{createAccount,jdbcType=INTEGER},
#{createAccountName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OperateLog">
insert into t_operate_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="thirdPartyId != null">
third_party_id,
</if>
<if test="preName != null">
pre_name,
</if>
<if test="preValue != null">
pre_value,
</if>
<if test="name != null">
name,
</if>
<if test="value != null">
value,
</if>
<if test="desc != null">
desc,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createAccountName != null">
create_account_name,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="thirdPartyId != null">
#{thirdPartyId,jdbcType=VARCHAR},
</if>
<if test="preName != null">
#{preName,jdbcType=VARCHAR},
</if>
<if test="preValue != null">
#{preValue,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
#{value,jdbcType=VARCHAR},
</if>
<if test="desc != null">
#{desc,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=INTEGER},
</if>
<if test="createAccountName != null">
#{createAccountName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OperateLog">
update t_operate_log
<set>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="thirdPartyId != null">
third_party_id = #{thirdPartyId,jdbcType=VARCHAR},
</if>
<if test="preName != null">
pre_name = #{preName,jdbcType=VARCHAR},
</if>
<if test="preValue != null">
pre_value = #{preValue,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="value != null">
value = #{value,jdbcType=VARCHAR},
</if>
<if test="desc != null">
desc = #{desc,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=INTEGER},
</if>
<if test="createAccountName != null">
create_account_name = #{createAccountName,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.OperateLog">
update t_operate_log
set type = #{type,jdbcType=INTEGER},
third_party_id = #{thirdPartyId,jdbcType=VARCHAR},
pre_name = #{preName,jdbcType=VARCHAR},
pre_value = #{preValue,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
value = #{value,jdbcType=VARCHAR},
desc = #{desc,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=INTEGER},
create_account_name = #{createAccountName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_operate_log
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.OperateLogBo"
resultType="com.boco.nbd.wios.manage.entity.bo.OperateLog">
select t.* from t_operate_log t
<where>
<if test="type != null">
and t.type = #{type}
</if>
<if test="typeList != null">
and t.type in
<foreach collection="typeList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="thirdPartyId != null and thirdPartyId != ''">
and t.third_party_id = #{thirdPartyId}
</if>
<if test="name != null and name !='' ">
and t.name = #{name}
</if>
</where>
order by t.create_time desc
</select>
<select id="getNewestCheckFailByOrderId" resultType="com.boco.nbd.wios.manage.entity.bo.OperateLog">
select
<include refid="Base_Column_List" />
from t_operate_log
where type=1
<if test="orderId != null and orderId != ''">
and third_party_id =#{orderId}
</if>
<if test="name != null and name != ''">
and name=#{name}
</if>
ORDER BY
create_time DESC
LIMIT 0,1
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.OrderAbnormalMapper">
<select id="getOrderAbnormalAll" resultType="com.boco.nbd.wios.flow.entity.bo.OrderAbnormalBO">
select a.id,
a.oem_name,
b.code oem_code,
case when a.region_level=1 then a.country_name when a.region_level=2 then a.area_name when a.region_level=3 then a.province_name when a.region_level=4 then a.region_name when a.region_level=5 then a.city_name end region_name,
a.address,
case a.user_sex when 0 then '女' when 1 then '男' else '未知' end user_sex,
a.user_phone,
case a.survey_before_sale_enable when 0 then '否' when 1 then '是' end survey_before_sale_enable,
a.vehicle_model,
a.vehicle_chassis_no,
a.wallbox_model,
a.vehicle_parking_status,
a.vehicle_parking_no,
a.out_order_id,
date_format(a.invoice_time, '%Y-%m-%d') invoice_time,
a.oem_agent_name,
a.oem_agent_contact_name,
a.oem_agent_info,
a.create_time,
a.status,
a.pack_type,
a.overtime_type,
case a.estate_type when 1 then '普通高层' when 2 then '商用两住' when 3 then '别墅' when 4 then '公司' when 5 then '厂房' when 6 then '自建房' when 7 then '其他' end estate_type,
case a.has_independent_parking when 0 then '否' when 1 then '是' end has_independent_parking,
case a.install_position when 1 then '室内' when 2 then '室外' end install_position,
case a.property_agree when 0 then '不同意' when 1 then '同意' end property_agree,
case a.electric_expand when 0 then '否' when 1 then '是' end electric_expand,
case a.need_erect_pile when 0 then '否' when 1 then '是' end need_erect_pile,
case a.manu_dispatch_enable when 0 then '否' when 1 then '是' end manu_dispatch_enable,
case a.is_need_survey when 0 then '否' when 1 then '是' end is_need_survey,
case a.install_emergency_level when 1 then '一般' when 2 then '紧急' end install_emergency_level
from t_order_abnormal a
left join t_oem b on a.oem_id = b.id
left join t_region c on a.region_id = c.id
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.OrderBlockedMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.flow.entity.po.OrderBlockedPO">
<id property="id" column="id" jdbcType="VARCHAR"/>
<result property="orderId" column="order_id" jdbcType="VARCHAR"/>
<result property="nodeFlag" column="node_flag" jdbcType="VARCHAR"/>
<result property="currentNode" column="current_node" jdbcType="VARCHAR"/>
<result property="remarks" column="remarks" jdbcType="VARCHAR"/>
<result property="whether" column="whether" jdbcType="VARCHAR"/>
<result property="status" column="status" jdbcType="VARCHAR"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="nextTime" column="next_time" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,order_id,node_flag,current_node,
remarks,whether,status,
update_time,next_time
</sql>
<select id="getAllByIdList" resultType="com.boco.nbd.wios.flow.entity.po.OrderBlockedPO">
select
<include refid="Base_Column_List" />
from t_order_blocked
where order_id = #{orderId}
<if test="nodeFlag != null and nodeFlag != ''">
and node_flag = #{nodeFlag}
</if>
order by node_flag asc,update_time asc
</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.boco.nbd.wios.manage.mapper.def.OrderDeleteMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OrderDelete" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="oem_id" property="oemId" jdbcType="INTEGER" />
<result column="oem_agent_id" property="oemAgentId" jdbcType="INTEGER" />
<result column="oem_agent_info" property="oemAgentInfo" jdbcType="VARCHAR" />
<result column="oem_agent_contact_name" property="oemAgentContactName" jdbcType="VARCHAR" />
<result column="oem_agent_contact_phone" property="oemAgentContactPhone" jdbcType="VARCHAR" />
<result column="out_order_id" property="outOrderId" jdbcType="VARCHAR" />
<result column="contract_id" property="contractId" jdbcType="INTEGER" />
<result column="supplier_contract_id" property="supplierContractId" jdbcType="INTEGER" />
<result column="user_name" property="userName" jdbcType="VARCHAR" />
<result column="user_phone" property="userPhone" jdbcType="VARCHAR" />
<result column="user_sex" property="userSex" jdbcType="INTEGER" />
<result column="contact_name" property="contactName" jdbcType="VARCHAR" />
<result column="contact_phone" property="contactPhone" jdbcType="VARCHAR" />
<result column="region_id" property="regionId" jdbcType="VARCHAR" />
<result column="warehouse_id" property="warehouseId" jdbcType="VARCHAR" />
<result column="address" property="address" jdbcType="VARCHAR" />
<result column="vehicle_model" property="vehicleModel" jdbcType="VARCHAR" />
<result column="vehicle_chassis_no" property="vehicleChassisNo" jdbcType="VARCHAR" />
<result column="vehicle_vin" property="vehicleVin" jdbcType="VARCHAR" />
<result column="vehicle_parking_no" property="vehicleParkingNo" jdbcType="VARCHAR" />
<result column="vehicle_parking_status" property="vehicleParkingStatus" jdbcType="VARCHAR" />
<result column="survey_before_sale_enable" property="surveyBeforeSaleEnable" jdbcType="BIT" />
<result column="manu_dispatch_enable" property="manuDispatchEnable" jdbcType="BIT" />
<result column="wallbox_model" property="wallboxModel" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="BIT" />
<result column="expand_status" property="expandStatus" jdbcType="BIT" />
<result column="expand_fail_reason" property="expandFailReason" jdbcType="VARCHAR" />
<result column="expand_fail_operate" property="expandFailOperate" jdbcType="INTEGER" />
<result column="expand_remark" property="expandRemark" jdbcType="VARCHAR" />
<result column="survey_staff_id" property="surveyStaffId" jdbcType="INTEGER" />
<result column="survey_finish_time" property="surveyFinishTime" jdbcType="TIMESTAMP" />
<result column="survey_reserve_time" property="surveyReserveTime" jdbcType="TIMESTAMP" />
<result column="survey_client_name" property="surveyClientName" jdbcType="VARCHAR" />
<result column="survey_client_phone" property="surveyClientPhone" jdbcType="VARCHAR" />
<result column="survey_cams_phone" property="surveyCamsPhone" jdbcType="VARCHAR" />
<result column="survey_reserve_remark" property="surveyReserveRemark" jdbcType="VARCHAR" />
<result column="install_supplier_id" property="installSupplierId" jdbcType="INTEGER" />
<result column="install_staff_id" property="installStaffId" jdbcType="INTEGER" />
<result column="install_finish_time" property="installFinishTime" jdbcType="TIMESTAMP" />
<result column="install_reserve_time" property="installReserveTime" jdbcType="TIMESTAMP" />
<result column="install_client_name" property="installClientName" jdbcType="VARCHAR" />
<result column="install_client_phone" property="installClientPhone" jdbcType="VARCHAR" />
<result column="install_cams_phone" property="installCamsPhone" jdbcType="VARCHAR" />
<result column="install_reserve_remark" property="installReserveRemark" jdbcType="VARCHAR" />
<result column="survey_finish_fail_reason" property="surveyFinishFailReason" jdbcType="VARCHAR" />
<result column="survey_rectify_fail_reason" property="surveyRectifyFailReason" jdbcType="VARCHAR" />
<result column="install_change_fail_reason" property="installChangeFailReason" jdbcType="VARCHAR" />
<result column="install_finish_fail_reason" property="installFinishFailReason" jdbcType="VARCHAR" />
<result column="install_rectify_fail_reason" property="installRectifyFailReason" jdbcType="VARCHAR" />
<result column="close_order_reason" property="closeOrderReason" jdbcType="VARCHAR" />
<result column="install_change_attachment_files" property="installChangeAttachmentFiles" jdbcType="VARCHAR" />
<result column="survey_reserve_fail_info" property="surveyReserveFailInfo" jdbcType="VARCHAR" />
<result column="install_reserve_fail_info" property="installReserveFailInfo" jdbcType="VARCHAR" />
<result column="files" property="files" jdbcType="VARCHAR" />
<result column="description" property="description" jdbcType="VARCHAR" />
<result column="score" property="score" jdbcType="DECIMAL" />
<result column="visit_content" property="visitContent" jdbcType="VARCHAR" />
<result column="invoice_time" property="invoiceTime" jdbcType="TIMESTAMP" />
<result column="estate_type" property="estateType" jdbcType="BIT" />
<result column="has_independent_parking" property="hasIndependentParking" jdbcType="BIT" />
<result column="install_position" property="installPosition" jdbcType="BIT" />
<result column="property_agree" property="propertyAgree" jdbcType="BIT" />
<result column="electric_expand" property="electricExpand" jdbcType="BIT" />
<result column="need_erect_pile" property="needErectPile" jdbcType="BIT" />
<result column="dispatch_time" property="dispatchTime" jdbcType="TIMESTAMP" />
<result column="survey_submit_examine_time" property="surveySubmitExamineTime" jdbcType="TIMESTAMP" />
<result column="survey_approve_time" property="surveyApproveTime" jdbcType="TIMESTAMP" />
<result column="install_submit_examine_time" property="installSubmitExamineTime" jdbcType="TIMESTAMP" />
<result column="install_approve_time" property="installApproveTime" jdbcType="TIMESTAMP" />
<result column="return_visit_time" property="returnVisitTime" jdbcType="TIMESTAMP" />
<result column="close_time" property="closeTime" jdbcType="TIMESTAMP" />
<result column="create_account" property="createAccount" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
<result column="item_model" jdbcType="VARCHAR" property="itemModel" />
<result column="survey_wallbox_model" jdbcType="VARCHAR" property="surveyWallboxModel" />
<result column="survey_item_model" jdbcType="VARCHAR" property="surveyItemModel" />
<result column="install_wallbox_model" jdbcType="VARCHAR" property="installWallboxModel" />
<result column="install_item_model" jdbcType="VARCHAR" property="installItemModel" />
<result column="survey_follow_time" jdbcType="TIMESTAMP" property="surveyFollowTime" />
<result column="install_follow_time" jdbcType="TIMESTAMP" property="installFollowTime" />
<result column="address_lat" jdbcType="VARCHAR" property="addressLat" />
<result column="address_lng" jdbcType="VARCHAR" property="addressLng" />
<result column="connect_person" property="connectPerson" jdbcType="VARCHAR" />
<result column="want_home_time" property="wantHomeTime" jdbcType="TIMESTAMP" />
<result column="install_emergency_level" property="installEmergencyLevel" jdbcType="INTEGER" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="is_connect" property="isConnect" jdbcType="INTEGER" />
<result column="is_need_survey" property="isNeedSurvey" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List">
id, oem_id, oem_agent_id, oem_agent_contact_name,oem_agent_info, oem_agent_contact_phone, out_order_id,
contract_id, supplier_contract_id, user_name, user_phone, user_sex, contact_name,
contact_phone, region_id, warehouse_id, address, vehicle_model, vehicle_chassis_no,
vehicle_vin, vehicle_parking_no, vehicle_parking_status, survey_before_sale_enable,
manu_dispatch_enable, wallbox_model, status, type, expand_status, expand_fail_reason,
expand_fail_operate, expand_remark, survey_staff_id, survey_finish_time, survey_reserve_time,
survey_client_name, survey_client_phone, survey_cams_phone, survey_reserve_remark,
install_supplier_id, install_staff_id, install_finish_time, install_reserve_time,
install_client_name, install_client_phone, install_cams_phone, install_reserve_remark,
survey_finish_fail_reason, survey_rectify_fail_reason, install_change_fail_reason,
install_finish_fail_reason, install_rectify_fail_reason, close_order_reason, install_change_attachment_files,
survey_reserve_fail_info, install_reserve_fail_info, files, description, score, visit_content,
invoice_time, estate_type, has_independent_parking, install_position, property_agree,
electric_expand, need_erect_pile, dispatch_time, survey_submit_examine_time, survey_approve_time,
install_submit_examine_time, install_approve_time, return_visit_time, close_time,
create_account, create_time, modify_account, modify_time,
item_model,survey_wallbox_model,survey_item_model,install_wallbox_model,install_item_model,
survey_follow_time,install_follow_time,address_lat,address_lng,
connect_person, want_home_time, install_emergency_level, remark, is_connect,is_need_survey
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderDelete" >
insert into t_order_delete (id, oem_id, oem_agent_id, oem_agent_info,
oem_agent_contact_name, oem_agent_contact_phone,
out_order_id, contract_id, supplier_contract_id,
user_name, user_phone, user_sex,
contact_name, contact_phone, region_id,
warehouse_id, address, vehicle_model,
vehicle_chassis_no, vehicle_vin, vehicle_parking_no,
vehicle_parking_status, survey_before_sale_enable,
manu_dispatch_enable, wallbox_model, status,
type, expand_status, expand_fail_reason,
expand_fail_operate, expand_remark, survey_staff_id,
survey_finish_time, survey_reserve_time,
survey_client_name, survey_client_phone, survey_cams_phone,
survey_reserve_remark, install_supplier_id,
install_staff_id, install_finish_time, install_reserve_time,
install_client_name, install_client_phone,
install_cams_phone, install_reserve_remark,
survey_finish_fail_reason, survey_rectify_fail_reason,
install_change_fail_reason, install_finish_fail_reason,
install_rectify_fail_reason, close_order_reason,
install_change_attachment_files, survey_reserve_fail_info,
install_reserve_fail_info, files, description,
score, visit_content, invoice_time,
estate_type, has_independent_parking, install_position,
property_agree, electric_expand, need_erect_pile,
dispatch_time, survey_submit_examine_time,
survey_approve_time, install_submit_examine_time,
install_approve_time, return_visit_time,
close_time, create_account, create_time,
modify_account, modify_time,item_model,
survey_wallbox_model,survey_item_model,install_wallbox_model,install_item_model,
survey_follow_time,install_follow_time,address_lat,address_lng,
connect_person, want_home_time, install_emergency_level, remark, is_connect,is_need_survey)
values (#{id,jdbcType=VARCHAR}, #{oemId,jdbcType=INTEGER}, #{oemAgentId,jdbcType=INTEGER}, #{oemAgentInfo,jdbcType=VARCHAR},
#{oemAgentContactName,jdbcType=VARCHAR}, #{oemAgentContactPhone,jdbcType=VARCHAR},
#{outOrderId,jdbcType=VARCHAR}, #{contractId,jdbcType=INTEGER}, #{supplierContractId,jdbcType=INTEGER},
#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, #{userSex,jdbcType=INTEGER},
#{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, #{regionId,jdbcType=VARCHAR},
#{warehouseId,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{vehicleModel,jdbcType=VARCHAR},
#{vehicleChassisNo,jdbcType=VARCHAR}, #{vehicleVin,jdbcType=VARCHAR}, #{vehicleParkingNo,jdbcType=VARCHAR},
#{vehicleParkingStatus,jdbcType=VARCHAR}, #{surveyBeforeSaleEnable,jdbcType=INTEGER},
#{manuDispatchEnable,jdbcType=INTEGER}, #{wallboxModel,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{type,jdbcType=INTEGER}, #{expandStatus,jdbcType=INTEGER}, #{expandFailReason,jdbcType=VARCHAR},
#{expandFailOperate,jdbcType=INTEGER}, #{expandRemark,jdbcType=VARCHAR}, #{surveyStaffId,jdbcType=INTEGER},
#{surveyFinishTime,jdbcType=TIMESTAMP}, #{surveyReserveTime,jdbcType=TIMESTAMP},
#{surveyClientName,jdbcType=VARCHAR}, #{surveyClientPhone,jdbcType=VARCHAR}, #{surveyCamsPhone,jdbcType=VARCHAR},
#{surveyReserveRemark,jdbcType=VARCHAR}, #{installSupplierId,jdbcType=INTEGER},
#{installStaffId,jdbcType=INTEGER}, #{installFinishTime,jdbcType=TIMESTAMP}, #{installReserveTime,jdbcType=TIMESTAMP},
#{installClientName,jdbcType=VARCHAR}, #{installClientPhone,jdbcType=VARCHAR},
#{installCamsPhone,jdbcType=VARCHAR}, #{installReserveRemark,jdbcType=VARCHAR},
#{surveyFinishFailReason,jdbcType=VARCHAR}, #{surveyRectifyFailReason,jdbcType=VARCHAR},
#{installChangeFailReason,jdbcType=VARCHAR}, #{installFinishFailReason,jdbcType=VARCHAR},
#{installRectifyFailReason,jdbcType=VARCHAR}, #{closeOrderReason,jdbcType=VARCHAR},
#{installChangeAttachmentFiles,jdbcType=VARCHAR}, #{surveyReserveFailInfo,jdbcType=VARCHAR},
#{installReserveFailInfo,jdbcType=VARCHAR}, #{files,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{score,jdbcType=DECIMAL}, #{visitContent,jdbcType=VARCHAR}, #{invoiceTime,jdbcType=TIMESTAMP},
#{estateType,jdbcType=INTEGER}, #{hasIndependentParking,jdbcType=INTEGER}, #{installPosition,jdbcType=INTEGER},
#{propertyAgree,jdbcType=INTEGER}, #{electricExpand,jdbcType=INTEGER}, #{needErectPile,jdbcType=INTEGER},
#{dispatchTime,jdbcType=TIMESTAMP}, #{surveySubmitExamineTime,jdbcType=TIMESTAMP},
#{surveyApproveTime,jdbcType=TIMESTAMP}, #{installSubmitExamineTime,jdbcType=TIMESTAMP},
#{installApproveTime,jdbcType=TIMESTAMP}, #{returnVisitTime,jdbcType=TIMESTAMP},
#{closeTime,jdbcType=TIMESTAMP}, #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{itemModel,jdbcType=VARCHAR}, #{surveyWallboxModel,jdbcType=VARCHAR},
#{surveyItemModel,jdbcType=VARCHAR}, #{installWallboxModel,jdbcType=VARCHAR}, #{installItemModel,jdbcType=VARCHAR},
#{surveyFollowTime,jdbcType=TIMESTAMP},#{installFollowTime,jdbcType=TIMESTAMP}, #{addressLat,jdbcType=VARCHAR},#{addressLng,jdbcType=VARCHAR},
#{connectPerson,jdbcType=VARCHAR}, #{wantHomeTime,jdbcType=TIMESTAMP}, #{installEmergencyLevel,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR}, #{isConnect,jdbcType=INTEGER}, #{isNeedSurvey,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderDelete" >
insert into t_order_delete
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="oemId != null" >
oem_id,
</if>
<if test="oemAgentId != null" >
oem_agent_id,
</if>
<if test="oemAgentInfo != null" >
oem_agent_info,
</if>
<if test="oemAgentContactName != null" >
oem_agent_contact_name,
</if>
<if test="oemAgentContactPhone != null" >
oem_agent_contact_phone,
</if>
<if test="outOrderId != null" >
out_order_id,
</if>
<if test="contractId != null" >
contract_id,
</if>
<if test="supplierContractId != null" >
supplier_contract_id,
</if>
<if test="userName != null" >
user_name,
</if>
<if test="userPhone != null" >
user_phone,
</if>
<if test="userSex != null" >
user_sex,
</if>
<if test="contactName != null" >
contact_name,
</if>
<if test="contactPhone != null" >
contact_phone,
</if>
<if test="regionId != null" >
region_id,
</if>
<if test="warehouseId != null" >
warehouse_id,
</if>
<if test="address != null" >
address,
</if>
<if test="vehicleModel != null" >
vehicle_model,
</if>
<if test="vehicleChassisNo != null" >
vehicle_chassis_no,
</if>
<if test="vehicleVin != null" >
vehicle_vin,
</if>
<if test="vehicleParkingNo != null" >
vehicle_parking_no,
</if>
<if test="vehicleParkingStatus != null" >
vehicle_parking_status,
</if>
<if test="surveyBeforeSaleEnable != null" >
survey_before_sale_enable,
</if>
<if test="manuDispatchEnable != null" >
manu_dispatch_enable,
</if>
<if test="wallboxModel != null" >
wallbox_model,
</if>
<if test="status != null" >
status,
</if>
<if test="type != null" >
type,
</if>
<if test="expandStatus != null" >
expand_status,
</if>
<if test="expandFailReason != null" >
expand_fail_reason,
</if>
<if test="expandFailOperate != null" >
expand_fail_operate,
</if>
<if test="expandRemark != null" >
expand_remark,
</if>
<if test="surveyStaffId != null" >
survey_staff_id,
</if>
<if test="surveyFinishTime != null" >
survey_finish_time,
</if>
<if test="surveyReserveTime != null" >
survey_reserve_time,
</if>
<if test="surveyClientName != null" >
survey_client_name,
</if>
<if test="surveyClientPhone != null" >
survey_client_phone,
</if>
<if test="surveyCamsPhone != null" >
survey_cams_phone,
</if>
<if test="surveyReserveRemark != null" >
survey_reserve_remark,
</if>
<if test="installSupplierId != null" >
install_supplier_id,
</if>
<if test="installStaffId != null" >
install_staff_id,
</if>
<if test="installFinishTime != null" >
install_finish_time,
</if>
<if test="installReserveTime != null" >
install_reserve_time,
</if>
<if test="installClientName != null" >
install_client_name,
</if>
<if test="installClientPhone != null" >
install_client_phone,
</if>
<if test="installCamsPhone != null" >
install_cams_phone,
</if>
<if test="installReserveRemark != null" >
install_reserve_remark,
</if>
<if test="surveyFinishFailReason != null" >
survey_finish_fail_reason,
</if>
<if test="surveyRectifyFailReason != null" >
survey_rectify_fail_reason,
</if>
<if test="installChangeFailReason != null" >
install_change_fail_reason,
</if>
<if test="installFinishFailReason != null" >
install_finish_fail_reason,
</if>
<if test="installRectifyFailReason != null" >
install_rectify_fail_reason,
</if>
<if test="closeOrderReason != null" >
close_order_reason,
</if>
<if test="installChangeAttachmentFiles != null" >
install_change_attachment_files,
</if>
<if test="surveyReserveFailInfo != null" >
survey_reserve_fail_info,
</if>
<if test="installReserveFailInfo != null" >
install_reserve_fail_info,
</if>
<if test="files != null" >
files,
</if>
<if test="description != null" >
description,
</if>
<if test="score != null" >
score,
</if>
<if test="visitContent != null" >
visit_content,
</if>
<if test="invoiceTime != null" >
invoice_time,
</if>
<if test="estateType != null" >
estate_type,
</if>
<if test="hasIndependentParking != null" >
has_independent_parking,
</if>
<if test="installPosition != null" >
install_position,
</if>
<if test="propertyAgree != null" >
property_agree,
</if>
<if test="electricExpand != null" >
electric_expand,
</if>
<if test="needErectPile != null" >
need_erect_pile,
</if>
<if test="dispatchTime != null" >
dispatch_time,
</if>
<if test="surveySubmitExamineTime != null" >
survey_submit_examine_time,
</if>
<if test="surveyApproveTime != null" >
survey_approve_time,
</if>
<if test="installSubmitExamineTime != null" >
install_submit_examine_time,
</if>
<if test="installApproveTime != null" >
install_approve_time,
</if>
<if test="returnVisitTime != null" >
return_visit_time,
</if>
<if test="closeTime != null" >
close_time,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="modifyAccount != null" >
modify_account,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
<if test="itemModel != null" >
item_model,
</if>
<if test="surveyWallboxModel != null" >
survey_wallbox_model,
</if>
<if test="surveyItemModel != null" >
survey_item_model,
</if>
<if test="installWallboxModel != null" >
install_wallbox_model,
</if>
<if test="installItemModel != null" >
install_item_model,
</if>
<if test="surveyFollowTime != null" >
survey_follow_time,
</if>
<if test="installFollowTime != null" >
install_follow_time,
</if>
<if test="addressLat != null" >
address_lat,
</if>
<if test="addressLng != null" >
address_lng,
</if>
<if test="connectPerson != null" >
connect_person,
</if>
<if test="wantHomeTime != null" >
want_home_time,
</if>
<if test="installEmergencyLevel != null" >
install_emergency_level,
</if>
<if test="remark != null" >
remark,
</if>
<if test="isConnect != null" >
is_connect,
</if>
<if test="isNeedSurvey != null" >
is_need_survey,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id},
</if>
<if test="oemId != null" >
#{oemId},
</if>
<if test="oemAgentId != null" >
#{oemAgentId},
</if>
<if test="oemAgentInfo != null" >
#{oemAgentInfo},
</if>
<if test="oemAgentContactName != null" >
#{oemAgentContactName},
</if>
<if test="oemAgentContactPhone != null" >
#{oemAgentContactPhone},
</if>
<if test="outOrderId != null" >
#{outOrderId},
</if>
<if test="contractId != null" >
#{contractId},
</if>
<if test="supplierContractId != null" >
#{supplierContractId},
</if>
<if test="userName != null" >
#{userName},
</if>
<if test="userPhone != null" >
#{userPhone},
</if>
<if test="userSex != null" >
#{userSex},
</if>
<if test="contactName != null" >
#{contactName},
</if>
<if test="contactPhone != null" >
#{contactPhone},
</if>
<if test="regionId != null" >
#{regionId},
</if>
<if test="warehouseId != null" >
#{warehouseId},
</if>
<if test="address != null" >
#{address},
</if>
<if test="vehicleModel != null" >
#{vehicleModel},
</if>
<if test="vehicleChassisNo != null" >
#{vehicleChassisNo},
</if>
<if test="vehicleVin != null" >
#{vehicleVin},
</if>
<if test="vehicleParkingNo != null" >
#{vehicleParkingNo},
</if>
<if test="vehicleParkingStatus != null" >
#{vehicleParkingStatus},
</if>
<if test="surveyBeforeSaleEnable != null" >
#{surveyBeforeSaleEnable},
</if>
<if test="manuDispatchEnable != null" >
#{manuDispatchEnable},
</if>
<if test="wallboxModel != null" >
#{wallboxModel},
</if>
<if test="status != null" >
#{status},
</if>
<if test="type != null" >
#{type},
</if>
<if test="expandStatus != null" >
#{expandStatus},
</if>
<if test="expandFailReason != null" >
#{expandFailReason},
</if>
<if test="expandFailOperate != null" >
#{expandFailOperate},
</if>
<if test="expandRemark != null" >
#{expandRemark},
</if>
<if test="surveyStaffId != null" >
#{surveyStaffId},
</if>
<if test="surveyFinishTime != null" >
#{surveyFinishTime},
</if>
<if test="surveyReserveTime != null" >
#{surveyReserveTime},
</if>
<if test="surveyClientName != null" >
#{surveyClientName},
</if>
<if test="surveyClientPhone != null" >
#{surveyClientPhone},
</if>
<if test="surveyCamsPhone != null" >
#{surveyCamsPhone},
</if>
<if test="surveyReserveRemark != null" >
#{surveyReserveRemark},
</if>
<if test="installSupplierId != null" >
#{installSupplierId},
</if>
<if test="installStaffId != null" >
#{installStaffId},
</if>
<if test="installFinishTime != null" >
#{installFinishTime},
</if>
<if test="installReserveTime != null" >
#{installReserveTime},
</if>
<if test="installClientName != null" >
#{installClientName},
</if>
<if test="installClientPhone != null" >
#{installClientPhone},
</if>
<if test="installCamsPhone != null" >
#{installCamsPhone},
</if>
<if test="installReserveRemark != null" >
#{installReserveRemark},
</if>
<if test="surveyFinishFailReason != null" >
#{surveyFinishFailReason},
</if>
<if test="surveyRectifyFailReason != null" >
#{surveyRectifyFailReason},
</if>
<if test="installChangeFailReason != null" >
#{installChangeFailReason},
</if>
<if test="installFinishFailReason != null" >
#{installFinishFailReason},
</if>
<if test="installRectifyFailReason != null" >
#{installRectifyFailReason},
</if>
<if test="closeOrderReason != null" >
#{closeOrderReason},
</if>
<if test="installChangeAttachmentFiles != null" >
#{installChangeAttachmentFiles},
</if>
<if test="surveyReserveFailInfo != null" >
#{surveyReserveFailInfo},
</if>
<if test="installReserveFailInfo != null" >
#{installReserveFailInfo},
</if>
<if test="files != null" >
#{files},
</if>
<if test="description != null" >
#{description},
</if>
<if test="score != null" >
#{score},
</if>
<if test="visitContent != null" >
#{visitContent},
</if>
<if test="invoiceTime != null" >
#{invoiceTime},
</if>
<if test="estateType != null" >
#{estateType},
</if>
<if test="hasIndependentParking != null" >
#{hasIndependentParking},
</if>
<if test="installPosition != null" >
#{installPosition},
</if>
<if test="propertyAgree != null" >
#{propertyAgree},
</if>
<if test="electricExpand != null" >
#{electricExpand},
</if>
<if test="needErectPile != null" >
#{needErectPile},
</if>
<if test="dispatchTime != null" >
#{dispatchTime},
</if>
<if test="surveySubmitExamineTime != null" >
#{surveySubmitExamineTime},
</if>
<if test="surveyApproveTime != null" >
#{surveyApproveTime},
</if>
<if test="installSubmitExamineTime != null" >
#{installSubmitExamineTime},
</if>
<if test="installApproveTime != null" >
#{installApproveTime},
</if>
<if test="returnVisitTime != null" >
#{returnVisitTime},
</if>
<if test="closeTime != null" >
#{closeTime},
</if>
<if test="createAccount != null" >
#{createAccount},
</if>
<if test="createTime != null" >
#{createTime},
</if>
<if test="modifyAccount != null" >
#{modifyAccount},
</if>
<if test="modifyTime != null" >
#{modifyTime},
</if>
<if test="itemModel != null" >
#{itemModel},
</if>
<if test="surveyWallboxModel != null" >
#{surveyWallboxModel},
</if>
<if test="surveyItemModel != null" >
#{surveyItemModel},
</if>
<if test="installWallboxModel != null" >
#{installWallboxModel},
</if>
<if test="installItemModel != null" >
#{installItemModel},
</if>
<if test="surveyFollowTime != null" >
#{surveyFollowTime},
</if>
<if test="installFollowTime != null" >
#{installFollowTime},
</if>
<if test="addressLat != null" >
#{addressLat},
</if>
<if test="addressLng != null" >
#{addressLng},
</if>
<if test="connectPerson != null" >
#{connectPerson},
</if>
<if test="wantHomeTime != null" >
#{wantHomeTime},
</if>
<if test="installEmergencyLevel != null" >
#{installEmergencyLevel},
</if>
<if test="remark != null" >
#{remark},
</if>
<if test="isConnect != null" >
#{isConnect},
</if>
<if test="isNeedSurvey != null" >
#{isNeedSurvey},
</if>
</trim>
</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.boco.nbd.wios.manage.mapper.def.OrderInstallDeleteMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OrderInstallDelete" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="order_id" property="orderId" jdbcType="VARCHAR" />
<result column="third_user_id" property="thirdUserId" jdbcType="VARCHAR" />
<result column="pay_status" property="payStatus" jdbcType="BIT" />
<result column="vehicle_chassis_number" property="vehicleChassisNumber" jdbcType="VARCHAR" />
<result column="wallbox_no" property="wallboxNo" jdbcType="VARCHAR" />
<result column="wallbox_quantity" property="wallboxQuantity" jdbcType="INTEGER" />
<result column="wallbox_item_id" property="wallboxItemId" jdbcType="VARCHAR" />
<result column="house_type" property="houseType" jdbcType="BIT" />
<result column="parking_type" property="parkingType" jdbcType="BIT" />
<result column="address" property="address" jdbcType="VARCHAR" />
<result column="electric_expand" property="electricExpand" jdbcType="BIT" />
<result column="expand_method" property="expandMethod" jdbcType="BIT" />
<result column="install_power_type" property="installPowerType" jdbcType="VARCHAR" />
<result column="install_power_remark" property="installPowerRemark" jdbcType="VARCHAR" />
<result column="install_power_position" property="installPowerPosition" jdbcType="VARCHAR" />
<result column="parking_no" property="parkingNo" jdbcType="VARCHAR" />
<result column="real_install_type" property="realInstallType" jdbcType="INTEGER" />
<result column="real_cable_type" property="realCableType" jdbcType="VARCHAR" />
<result column="real_cable_meter" property="realCableMeter" jdbcType="VARCHAR" />
<result column="real_cable_install_type" property="realCableInstallType" jdbcType="INTEGER" />
<result column="predict_over_item" property="predictOverItem" jdbcType="VARCHAR" />
<result column="predict_total_fee" property="predictTotalFee" jdbcType="DECIMAL" />
<result column="expand_fee" property="expandFee" jdbcType="DECIMAL" />
<result column="debug_check" property="debugCheck" jdbcType="VARCHAR" />
<result column="attachment" property="attachment" jdbcType="VARCHAR" />
<result column="train_content" property="trainContent" jdbcType="VARCHAR" />
<result column="install_remark" property="installRemark" jdbcType="VARCHAR" />
<result column="user_wallbox_pic" property="userWallboxPic" jdbcType="VARCHAR" />
<result column="wallbox_nameplate_pic" property="wallboxNameplatePic" jdbcType="VARCHAR" />
<result column="void_open_pic" property="voidOpenPic" jdbcType="VARCHAR" />
<result column="leakage_protect_pic" property="leakageProtectPic" jdbcType="VARCHAR" />
<result column="client_rate" property="clientRate" jdbcType="INTEGER" />
<result column="client_signature" property="clientSignature" jdbcType="VARCHAR" />
<result column="install_attachment_files" property="installAttachmentFiles" jdbcType="VARCHAR" />
<result column="create_account" property="createAccount" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, order_id, third_user_id, pay_status, vehicle_chassis_number, wallbox_no, wallbox_quantity,
wallbox_item_id, house_type, parking_type, address, electric_expand, expand_method,
install_power_type, install_power_remark, install_power_position, parking_no, real_install_type,
real_cable_type, real_cable_meter, real_cable_install_type, predict_over_item, predict_total_fee,
expand_fee, debug_check, attachment, train_content, install_remark, user_wallbox_pic,
wallbox_nameplate_pic, void_open_pic, leakage_protect_pic, client_rate, client_signature,
install_attachment_files, create_account, create_time, modify_account, modify_time
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallDelete" >
insert into t_order_install_delete ( order_id, third_user_id,
pay_status, vehicle_chassis_number, wallbox_no,
wallbox_quantity, wallbox_item_id, house_type,
parking_type, address, electric_expand,
expand_method, install_power_type, install_power_remark,
install_power_position, parking_no, real_install_type,
real_cable_type, real_cable_meter, real_cable_install_type,
predict_over_item, predict_total_fee, expand_fee,
debug_check, attachment, train_content,
install_remark, user_wallbox_pic, wallbox_nameplate_pic,
void_open_pic, leakage_protect_pic, client_rate,
client_signature, install_attachment_files,
create_account, create_time, modify_account,
modify_time)
values ( #{orderId,jdbcType=VARCHAR}, #{thirdUserId,jdbcType=VARCHAR},
#{payStatus,jdbcType=BIT}, #{vehicleChassisNumber,jdbcType=VARCHAR}, #{wallboxNo,jdbcType=VARCHAR},
#{wallboxQuantity,jdbcType=INTEGER}, #{wallboxItemId,jdbcType=VARCHAR}, #{houseType,jdbcType=BIT},
#{parkingType,jdbcType=BIT}, #{address,jdbcType=VARCHAR}, #{electricExpand,jdbcType=BIT},
#{expandMethod,jdbcType=BIT}, #{installPowerType,jdbcType=VARCHAR}, #{installPowerRemark,jdbcType=VARCHAR},
#{installPowerPosition,jdbcType=VARCHAR}, #{parkingNo,jdbcType=VARCHAR}, #{realInstallType,jdbcType=INTEGER},
#{realCableType,jdbcType=VARCHAR}, #{realCableMeter,jdbcType=VARCHAR}, #{realCableInstallType,jdbcType=INTEGER},
#{predictOverItem,jdbcType=VARCHAR}, #{predictTotalFee,jdbcType=DECIMAL}, #{expandFee,jdbcType=DECIMAL},
#{debugCheck,jdbcType=VARCHAR}, #{attachment,jdbcType=VARCHAR}, #{trainContent,jdbcType=VARCHAR},
#{installRemark,jdbcType=VARCHAR}, #{userWallboxPic,jdbcType=VARCHAR}, #{wallboxNameplatePic,jdbcType=VARCHAR},
#{voidOpenPic,jdbcType=VARCHAR}, #{leakageProtectPic,jdbcType=VARCHAR}, #{clientRate,jdbcType=INTEGER},
#{clientSignature,jdbcType=VARCHAR}, #{installAttachmentFiles,jdbcType=VARCHAR},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallDelete" >
insert into t_order_install_delete
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="orderId != null" >
order_id,
</if>
<if test="thirdUserId != null" >
third_user_id,
</if>
<if test="payStatus != null" >
pay_status,
</if>
<if test="vehicleChassisNumber != null" >
vehicle_chassis_number,
</if>
<if test="wallboxNo != null" >
wallbox_no,
</if>
<if test="wallboxQuantity != null" >
wallbox_quantity,
</if>
<if test="wallboxItemId != null" >
wallbox_item_id,
</if>
<if test="houseType != null" >
house_type,
</if>
<if test="parkingType != null" >
parking_type,
</if>
<if test="address != null" >
address,
</if>
<if test="electricExpand != null" >
electric_expand,
</if>
<if test="expandMethod != null" >
expand_method,
</if>
<if test="installPowerType != null" >
install_power_type,
</if>
<if test="installPowerRemark != null" >
install_power_remark,
</if>
<if test="installPowerPosition != null" >
install_power_position,
</if>
<if test="parkingNo != null" >
parking_no,
</if>
<if test="realInstallType != null" >
real_install_type,
</if>
<if test="realCableType != null" >
real_cable_type,
</if>
<if test="realCableMeter != null" >
real_cable_meter,
</if>
<if test="realCableInstallType != null" >
real_cable_install_type,
</if>
<if test="predictOverItem != null" >
predict_over_item,
</if>
<if test="predictTotalFee != null" >
predict_total_fee,
</if>
<if test="expandFee != null" >
expand_fee,
</if>
<if test="debugCheck != null" >
debug_check,
</if>
<if test="attachment != null" >
attachment,
</if>
<if test="trainContent != null" >
train_content,
</if>
<if test="installRemark != null" >
install_remark,
</if>
<if test="userWallboxPic != null" >
user_wallbox_pic,
</if>
<if test="wallboxNameplatePic != null" >
wallbox_nameplate_pic,
</if>
<if test="voidOpenPic != null" >
void_open_pic,
</if>
<if test="leakageProtectPic != null" >
leakage_protect_pic,
</if>
<if test="clientRate != null" >
client_rate,
</if>
<if test="clientSignature != null" >
client_signature,
</if>
<if test="installAttachmentFiles != null" >
install_attachment_files,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="modifyAccount != null" >
modify_account,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="orderId != null" >
#{orderId,jdbcType=VARCHAR},
</if>
<if test="thirdUserId != null" >
#{thirdUserId,jdbcType=VARCHAR},
</if>
<if test="payStatus != null" >
#{payStatus,jdbcType=BIT},
</if>
<if test="vehicleChassisNumber != null" >
#{vehicleChassisNumber,jdbcType=VARCHAR},
</if>
<if test="wallboxNo != null" >
#{wallboxNo,jdbcType=VARCHAR},
</if>
<if test="wallboxQuantity != null" >
#{wallboxQuantity,jdbcType=INTEGER},
</if>
<if test="wallboxItemId != null" >
#{wallboxItemId,jdbcType=VARCHAR},
</if>
<if test="houseType != null" >
#{houseType,jdbcType=BIT},
</if>
<if test="parkingType != null" >
#{parkingType,jdbcType=BIT},
</if>
<if test="address != null" >
#{address,jdbcType=VARCHAR},
</if>
<if test="electricExpand != null" >
#{electricExpand,jdbcType=BIT},
</if>
<if test="expandMethod != null" >
#{expandMethod,jdbcType=BIT},
</if>
<if test="installPowerType != null" >
#{installPowerType,jdbcType=VARCHAR},
</if>
<if test="installPowerRemark != null" >
#{installPowerRemark,jdbcType=VARCHAR},
</if>
<if test="installPowerPosition != null" >
#{installPowerPosition,jdbcType=VARCHAR},
</if>
<if test="parkingNo != null" >
#{parkingNo,jdbcType=VARCHAR},
</if>
<if test="realInstallType != null" >
#{realInstallType,jdbcType=INTEGER},
</if>
<if test="realCableType != null" >
#{realCableType,jdbcType=VARCHAR},
</if>
<if test="realCableMeter != null" >
#{realCableMeter,jdbcType=VARCHAR},
</if>
<if test="realCableInstallType != null" >
#{realCableInstallType,jdbcType=INTEGER},
</if>
<if test="predictOverItem != null" >
#{predictOverItem,jdbcType=VARCHAR},
</if>
<if test="predictTotalFee != null" >
#{predictTotalFee,jdbcType=DECIMAL},
</if>
<if test="expandFee != null" >
#{expandFee,jdbcType=DECIMAL},
</if>
<if test="debugCheck != null" >
#{debugCheck,jdbcType=VARCHAR},
</if>
<if test="attachment != null" >
#{attachment,jdbcType=VARCHAR},
</if>
<if test="trainContent != null" >
#{trainContent,jdbcType=VARCHAR},
</if>
<if test="installRemark != null" >
#{installRemark,jdbcType=VARCHAR},
</if>
<if test="userWallboxPic != null" >
#{userWallboxPic,jdbcType=VARCHAR},
</if>
<if test="wallboxNameplatePic != null" >
#{wallboxNameplatePic,jdbcType=VARCHAR},
</if>
<if test="voidOpenPic != null" >
#{voidOpenPic,jdbcType=VARCHAR},
</if>
<if test="leakageProtectPic != null" >
#{leakageProtectPic,jdbcType=VARCHAR},
</if>
<if test="clientRate != null" >
#{clientRate,jdbcType=INTEGER},
</if>
<if test="clientSignature != null" >
#{clientSignature,jdbcType=VARCHAR},
</if>
<if test="installAttachmentFiles != null" >
#{installAttachmentFiles,jdbcType=VARCHAR},
</if>
<if test="createAccount != null" >
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null" >
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</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.boco.nbd.wios.manage.mapper.def.OrderInstallItemDeleteMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OrderInstallItemDelete" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="order_id" property="orderId" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="BIT" />
<result column="item_type" property="itemType" jdbcType="INTEGER" />
<result column="item_id" property="itemId" jdbcType="VARCHAR" />
<result column="item_name" property="itemName" jdbcType="VARCHAR" />
<result column="item_model" property="itemModel" jdbcType="VARCHAR" />
<result column="item_warehouse_id" property="itemWarehouseId" jdbcType="VARCHAR" />
<result column="contract_item_id" property="contractItemId" jdbcType="INTEGER" />
<result column="qunatity" property="qunatity" jdbcType="DECIMAL" />
<result column="fee" property="fee" jdbcType="DECIMAL" />
<result column="description" property="description" jdbcType="VARCHAR" />
<result column="create_account" property="createAccount" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, order_id, type, item_type, item_id, item_name, item_model, item_warehouse_id,
contract_item_id, qunatity, fee, description, create_account, create_time, modify_account,
modify_time
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItemDelete" >
insert into t_order_install_item_delete (id, order_id, type,
item_type, item_id, item_name,
item_model, item_warehouse_id, contract_item_id,
qunatity, fee, description,
create_account, create_time, modify_account,
modify_time)
values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=VARCHAR}, #{type,jdbcType=BIT},
#{itemType,jdbcType=INTEGER}, #{itemId,jdbcType=VARCHAR}, #{itemName,jdbcType=VARCHAR},
#{itemModel,jdbcType=VARCHAR}, #{itemWarehouseId,jdbcType=VARCHAR}, #{contractItemId,jdbcType=INTEGER},
#{qunatity,jdbcType=DECIMAL}, #{fee,jdbcType=DECIMAL}, #{description,jdbcType=VARCHAR},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItemDelete" >
insert into t_order_install_item_delete
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="orderId != null" >
order_id,
</if>
<if test="type != null" >
type,
</if>
<if test="itemType != null" >
item_type,
</if>
<if test="itemId != null" >
item_id,
</if>
<if test="itemName != null" >
item_name,
</if>
<if test="itemModel != null" >
item_model,
</if>
<if test="itemWarehouseId != null" >
item_warehouse_id,
</if>
<if test="contractItemId != null" >
contract_item_id,
</if>
<if test="qunatity != null" >
qunatity,
</if>
<if test="fee != null" >
fee,
</if>
<if test="description != null" >
description,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="modifyAccount != null" >
modify_account,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="orderId != null" >
#{orderId,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=BIT},
</if>
<if test="itemType != null" >
#{itemType,jdbcType=INTEGER},
</if>
<if test="itemId != null" >
#{itemId,jdbcType=VARCHAR},
</if>
<if test="itemName != null" >
#{itemName,jdbcType=VARCHAR},
</if>
<if test="itemModel != null" >
#{itemModel,jdbcType=VARCHAR},
</if>
<if test="itemWarehouseId != null" >
#{itemWarehouseId,jdbcType=VARCHAR},
</if>
<if test="contractItemId != null" >
#{contractItemId,jdbcType=INTEGER},
</if>
<if test="qunatity != null" >
#{qunatity,jdbcType=DECIMAL},
</if>
<if test="fee != null" >
#{fee,jdbcType=DECIMAL},
</if>
<if test="description != null" >
#{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null" >
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null" >
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_order_install_item_delete ( order_id,type, item_type,
item_id, item_name, item_model,
contract_item_id, qunatity, fee,
description, create_account, create_time,
modify_account, modify_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.orderId,jdbcType=VARCHAR},#{item.type,jdbcType=INTEGER}, #{item.itemType,jdbcType=INTEGER},
#{item.itemId,jdbcType=VARCHAR}, #{item.itemName,jdbcType=VARCHAR}, #{item.itemModel,jdbcType=VARCHAR},
#{item.contractItemId,jdbcType=INTEGER}, #{item.qunatity,jdbcType=DECIMAL}, #{item.fee,jdbcType=DECIMAL},
#{item.description,jdbcType=VARCHAR}, #{item.createAccount,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.modifyAccount,jdbcType=VARCHAR}, #{item.modifyTime,jdbcType=TIMESTAMP})
</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.boco.nbd.wios.manage.mapper.def.OrderInstallItemMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OrderInstallItem">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="order_id" jdbcType="VARCHAR" property="orderId"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="item_type" jdbcType="INTEGER" property="itemType"/>
<result column="item_id" jdbcType="VARCHAR" property="itemId"/>
<result column="item_name" jdbcType="VARCHAR" property="itemName"/>
<result column="item_model" jdbcType="VARCHAR" property="itemModel"/>
<result column="item_warehouse_id" jdbcType="VARCHAR" property="itemWarehouseId"/>
<result column="contract_item_id" jdbcType="INTEGER" property="contractItemId"/>
<result column="qunatity" jdbcType="DECIMAL" property="qunatity"/>
<result column="fee" jdbcType="DECIMAL" property="fee"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
<result column="create_account" jdbcType="VARCHAR" property="createAccount"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount"/>
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/>
</resultMap>
<sql id="Base_Column_List">
id
, order_id, type, item_type, item_id, item_name, item_model, item_warehouse_id,
contract_item_id, qunatity, fee, description, create_account, create_time, modify_account,
modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete
from t_order_install_item
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItem">
insert into t_order_install_item (id, order_id, type,
item_type, item_id, item_name,
item_model, item_warehouse_id, contract_item_id,
qunatity, fee, description,
create_account, create_time, modify_account,
modify_time)
values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
#{itemType,jdbcType=INTEGER}, #{itemId,jdbcType=VARCHAR}, #{itemName,jdbcType=VARCHAR},
#{itemModel,jdbcType=VARCHAR}, #{itemWarehouseId,jdbcType=VARCHAR}, #{contractItemId,jdbcType=INTEGER},
#{qunatity,jdbcType=DECIMAL}, #{fee,jdbcType=DECIMAL}, #{description,jdbcType=VARCHAR},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItem">
insert into t_order_install_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="type != null">
type,
</if>
<if test="itemType != null">
item_type,
</if>
<if test="itemId != null">
item_id,
</if>
<if test="itemName != null">
item_name,
</if>
<if test="itemModel != null">
item_model,
</if>
<if test="itemWarehouseId != null">
item_warehouse_id,
</if>
<if test="contractItemId != null">
contract_item_id,
</if>
<if test="qunatity != null">
qunatity,
</if>
<if test="fee != null">
fee,
</if>
<if test="description != null">
description,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="itemType != null">
#{itemType,jdbcType=INTEGER},
</if>
<if test="itemId != null">
#{itemId,jdbcType=VARCHAR},
</if>
<if test="itemName != null">
#{itemName,jdbcType=VARCHAR},
</if>
<if test="itemModel != null">
#{itemModel,jdbcType=VARCHAR},
</if>
<if test="itemWarehouseId != null">
#{itemWarehouseId,jdbcType=VARCHAR},
</if>
<if test="contractItemId != null">
#{contractItemId,jdbcType=INTEGER},
</if>
<if test="qunatity != null">
#{qunatity,jdbcType=DECIMAL},
</if>
<if test="fee != null">
#{fee,jdbcType=DECIMAL},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItem">
update t_order_install_item
<set>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="itemType != null">
item_type = #{itemType,jdbcType=INTEGER},
</if>
<if test="itemId != null">
item_id = #{itemId,jdbcType=VARCHAR},
</if>
<if test="itemName != null">
item_name = #{itemName,jdbcType=VARCHAR},
</if>
<if test="itemModel != null">
item_model = #{itemModel,jdbcType=VARCHAR},
</if>
<if test="itemWarehouseId != null">
item_warehouse_id = #{itemWarehouseId,jdbcType=VARCHAR},
</if>
<if test="contractItemId != null">
contract_item_id = #{contractItemId,jdbcType=INTEGER},
</if>
<if test="qunatity != null">
qunatity = #{qunatity,jdbcType=DECIMAL},
</if>
<if test="fee != null">
fee = #{fee,jdbcType=DECIMAL},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItem">
update t_order_install_item
set order_id = #{orderId,jdbcType=VARCHAR},
type = #{type,jdbcType=INTEGER},
item_type = #{itemType,jdbcType=INTEGER},
item_id = #{itemId,jdbcType=VARCHAR},
item_name = #{itemName,jdbcType=VARCHAR},
item_model = #{itemModel,jdbcType=VARCHAR},
item_warehouse_id = #{itemWarehouseId,jdbcType=VARCHAR},
contract_item_id = #{contractItemId,jdbcType=INTEGER},
qunatity = #{qunatity,jdbcType=DECIMAL},
fee = #{fee,jdbcType=DECIMAL},
description = #{description,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_order_install_item
where id = #{id,jdbcType=INTEGER}
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_order_install_item (id, order_id,type, item_type,
item_id, item_name, item_model,
contract_item_id, qunatity, fee,
description, create_account, create_time,
modify_account, modify_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.orderId,jdbcType=VARCHAR},#{item.type,jdbcType=INTEGER},
#{item.itemType,jdbcType=INTEGER},
#{item.itemId,jdbcType=VARCHAR}, #{item.itemName,jdbcType=VARCHAR}, #{item.itemModel,jdbcType=VARCHAR},
#{item.contractItemId,jdbcType=INTEGER}, #{item.qunatity,jdbcType=DECIMAL}, #{item.fee,jdbcType=DECIMAL},
#{item.description,jdbcType=VARCHAR}, #{item.createAccount,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.modifyAccount,jdbcType=VARCHAR}, #{item.modifyTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
<select id="selectByOrderIdAndType" resultType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItemVo">
select t.*, oci.price as price, oci.tax_rate as taxRate, oci.rate_price as ratePrice
from t_order_install_item t
left join t_oem_contract_item oci on t.contract_item_id = oci.id
where t.order_id = #{orderId}
and t.type = #{type}
</select>
<select id="selectByOrderId" resultType="com.boco.nbd.wios.manage.entity.bo.OrderInstallItem">
select
<include refid="Base_Column_List"/>
from t_order_install_item
where order_id = #{orderId}
</select>
<delete id="deleteByOrderId">
delete
from t_order_install_item
where order_id = #{orderId}
and type = #{type}
</delete>
<select id="selectPackById" parameterType="String" resultType="com.boco.nbd.wios.manage.entity.bo.OemCascadeBo">
SELECT
id,
NAME,
parent_id
FROM
t_oem_cascade
WHERE
id=#{id}
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.OrderInstallMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OrderInstall">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="third_user_id" jdbcType="VARCHAR" property="thirdUserId" />
<result column="pay_status" jdbcType="INTEGER" property="payStatus" />
<result column="vehicle_chassis_number" jdbcType="VARCHAR" property="vehicleChassisNumber" />
<result column="wallbox_no" jdbcType="VARCHAR" property="wallboxNo" />
<result column="wallbox_quantity" jdbcType="INTEGER" property="wallboxQuantity" />
<result column="wallbox_item_id" jdbcType="VARCHAR" property="wallboxItemId" />
<result column="house_type" jdbcType="INTEGER" property="houseType" />
<result column="parking_type" jdbcType="INTEGER" property="parkingType" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="electric_expand" jdbcType="INTEGER" property="electricExpand" />
<result column="electric_method" jdbcType="INTEGER" property="electricMethod" />
<result column="install_power_type" jdbcType="VARCHAR" property="installPowerType" />
<result column="install_power_remark" jdbcType="VARCHAR" property="installPowerRemark" />
<result column="install_power_position" jdbcType="VARCHAR" property="installPowerPosition" />
<result column="parking_no" jdbcType="VARCHAR" property="parkingNo" />
<result column="real_install_type" jdbcType="INTEGER" property="realInstallType" />
<result column="real_cable_type" jdbcType="VARCHAR" property="realCableType" />
<result column="real_cable_meter" jdbcType="VARCHAR" property="realCableMeter" />
<result column="real_cable_install_type" jdbcType="INTEGER" property="realCableInstallType" />
<result column="predict_over_item" jdbcType="VARCHAR" property="predictOverItem" />
<result column="predict_total_fee" jdbcType="DECIMAL" property="predictTotalFee" />
<result column="expand_fee" jdbcType="DECIMAL" property="expandFee" />
<result column="debug_check" jdbcType="VARCHAR" property="debugCheck" />
<result column="attachment" jdbcType="VARCHAR" property="attachment" />
<result column="train_content" jdbcType="VARCHAR" property="trainContent" />
<result column="install_remark" jdbcType="VARCHAR" property="installRemark" />
<result column="user_wallbox_pic" jdbcType="VARCHAR" property="userWallboxPic" />
<result column="wallbox_nameplate_pic" jdbcType="VARCHAR" property="wallboxNameplatePic" />
<result column="void_open_pic" jdbcType="VARCHAR" property="voidOpenPic" />
<result column="leakage_protect_pic" jdbcType="VARCHAR" property="leakageProtectPic" />
<result column="client_rate" jdbcType="INTEGER" property="clientRate" />
<result column="client_signature" jdbcType="VARCHAR" property="clientSignature" />
<result column="install_attachment_files" jdbcType="VARCHAR" property="installAttachmentFiles" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, order_id, third_user_id, pay_status, vehicle_chassis_number, wallbox_no, wallbox_quantity, wallbox_item_id,
house_type, parking_type, address, electric_expand,expand_method, install_power_type,install_power_remark,install_power_position,
parking_no, real_install_type, real_cable_type, real_cable_meter, real_cable_install_type,
predict_over_item, predict_total_fee, expand_fee, debug_check, attachment, train_content,
install_remark, user_wallbox_pic, wallbox_nameplate_pic, void_open_pic, leakage_protect_pic,
client_rate, client_signature, install_attachment_files, create_account, create_time, modify_account,
modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_order_install
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstall"
useGeneratedKeys="true" keyProperty="id" >
insert into t_order_install (id, order_id, third_user_id, pay_status,
vehicle_chassis_number, wallbox_no, wallbox_quantity,
wallbox_item_id, house_type, parking_type,
address, electric_expand,expand_method, install_power_type, install_power_remark,
install_power_position, parking_no, real_install_type,
real_cable_type, real_cable_meter, real_cable_install_type,
predict_over_item, predict_total_fee, expand_fee,
debug_check, attachment, train_content,
install_remark, user_wallbox_pic, wallbox_nameplate_pic,
void_open_pic, leakage_protect_pic, client_rate, client_signature,
install_attachment_files, create_account,
create_time, modify_account, modify_time
)
values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=VARCHAR}, #{thirdUserId,jdbcType=VARCHAR}, #{payStatus,jdbcType=INTEGER},
#{vehicleChassisNumber,jdbcType=VARCHAR}, #{wallboxNo,jdbcType=VARCHAR}, #{wallboxQuantity,jdbcType=INTEGER},
#{wallboxItemId,jdbcType=VARCHAR}, #{houseType,jdbcType=INTEGER}, #{parkingType,jdbcType=INTEGER},
#{address,jdbcType=VARCHAR}, #{electricExpand,jdbcType=INTEGER}, #{expandMethod,jdbcType=INTEGER}, #{installPowerType,jdbcType=VARCHAR},
#{installPowerRemark,jdbcType=VARCHAR}, #{installPowerPosition,jdbcType=VARCHAR}, #{parkingNo,jdbcType=VARCHAR}, #{realInstallType,jdbcType=INTEGER},
#{realCableType,jdbcType=VARCHAR}, #{realCableMeter,jdbcType=VARCHAR}, #{realCableInstallType,jdbcType=INTEGER},
#{predictOverItem,jdbcType=VARCHAR}, #{predictTotalFee,jdbcType=DECIMAL}, #{expandFee,jdbcType=DECIMAL},
#{debugCheck,jdbcType=VARCHAR}, #{attachment,jdbcType=VARCHAR}, #{trainContent,jdbcType=VARCHAR},
#{installRemark,jdbcType=VARCHAR}, #{userWallboxPic,jdbcType=VARCHAR}, #{wallboxNameplatePic,jdbcType=VARCHAR},
#{voidOpenPic,jdbcType=VARCHAR}, #{leakageProtectPic,jdbcType=VARCHAR}, #{clientRate,jdbcType=INTEGER}, #{clientSignature,jdbcType=VARCHAR},
#{installAttachmentFiles,jdbcType=VARCHAR}, #{createAccount,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstall">
insert into t_order_install
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="thirdUserId != null">
third_user_id,
</if>
<if test="payStatus != null">
pay_status,
</if>
<if test="vehicleChassisNumber != null">
vehicle_chassis_number,
</if>
<if test="wallboxNo != null">
wallbox_no,
</if>
<if test="wallboxQuantity != null">
wallbox_quantity,
</if>
<if test="wallboxItemId != null">
wallbox_item_id,
</if>
<if test="houseType != null">
house_type,
</if>
<if test="parkingType != null">
parking_type,
</if>
<if test="address != null">
address,
</if>
<if test="electricExpand != null">
electric_expand,
</if>
<if test="expandMethod != null">
expand_method,
</if>
<if test="installPowerType != null">
install_power_type,
</if>
<if test="installPowerRemark != null">
install_power_remark,
</if>
<if test="installPowerPosition != null">
install_power_position,
</if>
<if test="parkingNo != null">
parking_no,
</if>
<if test="realInstallType != null">
real_install_type,
</if>
<if test="realCableType != null">
real_cable_type,
</if>
<if test="realCableMeter != null">
real_cable_meter,
</if>
<if test="realCableInstallType != null">
real_cable_install_type,
</if>
<if test="predictOverItem != null">
predict_over_item,
</if>
<if test="predictTotalFee != null">
predict_total_fee,
</if>
<if test="expandFee != null">
expand_fee,
</if>
<if test="debugCheck != null">
debug_check,
</if>
<if test="attachment != null">
attachment,
</if>
<if test="trainContent != null">
train_content,
</if>
<if test="installRemark != null">
install_remark,
</if>
<if test="userWallboxPic != null">
user_wallbox_pic,
</if>
<if test="wallboxNameplatePic != null">
wallbox_nameplate_pic,
</if>
<if test="voidOpenPic != null">
void_open_pic,
</if>
<if test="leakageProtectPic != null">
leakage_protect_pic,
</if>
<if test="clientRate != null">
client_rate,
</if>
<if test="clientSignature != null">
client_signature,
</if>
<if test="installAttachmentFiles != null">
install_attachment_files,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="thirdUserId != null">
#{thirdUserId,jdbcType=VARCHAR},
</if>
<if test="payStatus != null">
#{payStatus,jdbcType=INTEGER},
</if>
<if test="vehicleChassisNumber != null">
#{vehicleChassisNumber,jdbcType=VARCHAR},
</if>
<if test="wallboxNo != null">
#{wallboxNo,jdbcType=VARCHAR},
</if>
<if test="wallboxQuantity != null">
#{wallboxQuantity,jdbcType=INTEGER},
</if>
<if test="wallboxItemId != null">
#{wallboxItemId,jdbcType=VARCHAR},
</if>
<if test="houseType != null">
#{houseType,jdbcType=INTEGER},
</if>
<if test="parkingType != null">
#{parkingType,jdbcType=INTEGER},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="electricExpand != null">
#{electricExpand,jdbcType=INTEGER},
</if>
<if test="expandMethod != null">
#{expandMethod,jdbcType=INTEGER},
</if>
<if test="installPowerType != null">
#{installPowerType,jdbcType=VARCHAR},
</if>
<if test="installPowerRemark != null">
#{installPowerRemark,jdbcType=VARCHAR},
</if>
<if test="installPowerPosition != null">
#{installPowerPosition,jdbcType=VARCHAR},
</if>
<if test="parkingNo != null">
#{parkingNo,jdbcType=VARCHAR},
</if>
<if test="realInstallType != null">
#{realInstallType,jdbcType=INTEGER},
</if>
<if test="realCableType != null">
#{realCableType,jdbcType=VARCHAR},
</if>
<if test="realCableMeter != null">
#{realCableMeter,jdbcType=VARCHAR},
</if>
<if test="realCableInstallType != null">
#{realCableInstallType,jdbcType=INTEGER},
</if>
<if test="predictOverItem != null">
#{predictOverItem,jdbcType=VARCHAR},
</if>
<if test="predictTotalFee != null">
#{predictTotalFee,jdbcType=DECIMAL},
</if>
<if test="expandFee != null">
#{expandFee,jdbcType=DECIMAL},
</if>
<if test="debugCheck != null">
#{debugCheck,jdbcType=VARCHAR},
</if>
<if test="attachment != null">
#{attachment,jdbcType=VARCHAR},
</if>
<if test="trainContent != null">
#{trainContent,jdbcType=VARCHAR},
</if>
<if test="installRemark != null">
#{installRemark,jdbcType=VARCHAR},
</if>
<if test="userWallboxPic != null">
#{userWallboxPic,jdbcType=VARCHAR},
</if>
<if test="wallboxNameplatePic != null">
#{wallboxNameplatePic,jdbcType=VARCHAR},
</if>
<if test="voidOpenPic != null">
#{voidOpenPic,jdbcType=VARCHAR},
</if>
<if test="leakageProtectPic != null">
#{leakageProtectPic,jdbcType=VARCHAR},
</if>
<if test="clientRate != null">
#{clientRate,jdbcType=INTEGER},
</if>
<if test="clientSignature != null">
#{clientSignature,jdbcType=VARCHAR},
</if>
<if test="installAttachmentFiles != null">
#{installAttachmentFiles,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstall">
update t_order_install
<set>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="thirdUserId != null">
third_user_id = #{thirdUserId,jdbcType=VARCHAR},
</if>
<if test="payStatus != null">
pay_status = #{payStatus,jdbcType=INTEGER},
</if>
<if test="vehicleChassisNumber != null">
vehicle_chassis_number = #{vehicleChassisNumber,jdbcType=VARCHAR},
</if>
<if test="wallboxNo != null">
wallbox_no = #{wallboxNo,jdbcType=VARCHAR},
</if>
<if test="wallboxQuantity != null">
wallbox_quantity = #{wallboxQuantity,jdbcType=INTEGER},
</if>
<if test="wallboxItemId != null">
wallbox_item_id = #{wallboxItemId,jdbcType=VARCHAR},
</if>
<if test="houseType != null">
house_type = #{houseType,jdbcType=INTEGER},
</if>
<if test="parkingType != null">
parking_type = #{parkingType,jdbcType=INTEGER},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="electricExpand != null">
electric_expand = #{electricExpand,jdbcType=INTEGER},
</if>
<if test="expandMethod != null">
expand_method = #{expandMethod,jdbcType=INTEGER},
</if>
<if test="installPowerType != null">
install_power_type = #{installPowerType,jdbcType=VARCHAR},
</if>
<if test="installPowerRemark != null">
install_power_remark = #{installPowerRemark,jdbcType=VARCHAR},
</if>
<if test="installPowerPosition != null">
install_power_position = #{installPowerPosition,jdbcType=VARCHAR},
</if>
<if test="parkingNo != null">
parking_no = #{parkingNo,jdbcType=VARCHAR},
</if>
<if test="realInstallType != null">
real_install_type = #{realInstallType,jdbcType=INTEGER},
</if>
<if test="realCableType != null">
real_cable_type = #{realCableType,jdbcType=VARCHAR},
</if>
<if test="realCableMeter != null">
real_cable_meter = #{realCableMeter,jdbcType=VARCHAR},
</if>
<if test="realCableInstallType != null">
real_cable_install_type = #{realCableInstallType,jdbcType=INTEGER},
</if>
<if test="predictOverItem != null">
predict_over_item = #{predictOverItem,jdbcType=VARCHAR},
</if>
<if test="predictTotalFee != null">
predict_total_fee = #{predictTotalFee,jdbcType=DECIMAL},
</if>
<if test="expandFee != null">
expand_fee = #{expandFee,jdbcType=DECIMAL},
</if>
<if test="debugCheck != null">
debug_check = #{debugCheck,jdbcType=VARCHAR},
</if>
<if test="attachment != null">
attachment = #{attachment,jdbcType=VARCHAR},
</if>
<if test="trainContent != null">
train_content = #{trainContent,jdbcType=VARCHAR},
</if>
<if test="installRemark != null">
install_remark = #{installRemark,jdbcType=VARCHAR},
</if>
<if test="userWallboxPic != null">
user_wallbox_pic = #{userWallboxPic,jdbcType=VARCHAR},
</if>
<if test="wallboxNameplatePic != null">
wallbox_nameplate_pic = #{wallboxNameplatePic,jdbcType=VARCHAR},
</if>
<if test="voidOpenPic != null">
void_open_pic = #{voidOpenPic,jdbcType=VARCHAR},
</if>
<if test="leakageProtectPic != null">
leakage_protect_pic = #{leakageProtectPic,jdbcType=VARCHAR},
</if>
<if test="clientRate != null">
client_rate = #{clientRate,jdbcType=INTEGER},
</if>
<if test="clientSignature != null">
client_signature = #{clientSignature,jdbcType=VARCHAR},
</if>
<if test="installAttachmentFiles != null">
install_attachment_files = #{installAttachmentFiles,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstall">
update t_order_install
set order_id = #{orderId,jdbcType=VARCHAR},
third_user_id = #{thirdUserId,jdbcType=VARCHAR},
pay_status = #{payStatus,jdbcType=INTEGER},
vehicle_chassis_number = #{vehicleChassisNumber,jdbcType=VARCHAR},
wallbox_no = #{wallboxNo,jdbcType=VARCHAR},
wallbox_quantity = #{wallboxQuantity,jdbcType=INTEGER},
wallbox_item_id = #{wallboxItemId,jdbcType=VARCHAR},
house_type = #{houseType,jdbcType=INTEGER},
parking_type = #{parkingType,jdbcType=INTEGER},
address = #{address,jdbcType=VARCHAR},
electric_expand = #{electricExpand,jdbcType=INTEGER},
expand_method = #{expandMethod,jdbcType=INTEGER},
install_power_type = #{installPowerType,jdbcType=VARCHAR},
install_power_remark = #{installPowerRemark,jdbcType=VARCHAR},
install_power_position = #{installPowerPosition,jdbcType=VARCHAR},
parking_no = #{parkingNo,jdbcType=VARCHAR},
real_install_type = #{realInstallType,jdbcType=INTEGER},
real_cable_type = #{realCableType,jdbcType=VARCHAR},
real_cable_meter = #{realCableMeter,jdbcType=VARCHAR},
real_cable_install_type = #{realCableInstallType,jdbcType=INTEGER},
predict_over_item = #{predictOverItem,jdbcType=VARCHAR},
predict_total_fee = #{predictTotalFee,jdbcType=DECIMAL},
expand_fee = #{expandFee,jdbcType=DECIMAL},
debug_check = #{debugCheck,jdbcType=VARCHAR},
attachment = #{attachment,jdbcType=VARCHAR},
train_content = #{trainContent,jdbcType=VARCHAR},
install_remark = #{installRemark,jdbcType=VARCHAR},
user_wallbox_pic = #{userWallboxPic,jdbcType=VARCHAR},
wallbox_nameplate_pic = #{wallboxNameplatePic,jdbcType=VARCHAR},
void_open_pic = #{voidOpenPic,jdbcType=VARCHAR},
leakage_protect_pic = #{leakageProtectPic,jdbcType=VARCHAR},
client_rate = #{clientRate,jdbcType=INTEGER},
client_signature = #{clientSignature,jdbcType=VARCHAR},
install_attachment_files = #{installAttachmentFiles,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_order_install
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByOrderId" parameterType="java.lang.String" resultMap="BaseResultMap">
select *
from t_order_install
where order_id = #{orderId}
</select>
<select id="selectByOrderIds" resultType="com.boco.nbd.wios.manage.entity.bo.OrderInstallVo">
select t.*,o.user_name as userName,o.user_phone as userPhone,
o.install_finish_time as installFinishTime,o.region_id as regionId
from t_order_install t
left join t_order o on o.id=t.order_id
where
t.order_id in
<foreach collection="orderIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
<update id="updateByOrderId" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderInstall">
update t_order_install
<set>
<if test="thirdUserId != null">
third_user_id = #{thirdUserId,jdbcType=VARCHAR},
</if>
<if test="payStatus != null">
pay_status = #{payStatus,jdbcType=INTEGER},
</if>
<if test="vehicleChassisNumber != null">
vehicle_chassis_number = #{vehicleChassisNumber,jdbcType=VARCHAR},
</if>
<if test="wallboxNo != null">
wallbox_no = #{wallboxNo,jdbcType=VARCHAR},
</if>
<if test="wallboxQuantity != null">
wallbox_quantity = #{wallboxQuantity,jdbcType=INTEGER},
</if>
<if test="wallboxItemId != null">
wallbox_item_id = #{wallboxItemId,jdbcType=VARCHAR},
</if>
<if test="houseType != null">
house_type = #{houseType,jdbcType=INTEGER},
</if>
<if test="parkingType != null">
parking_type = #{parkingType,jdbcType=INTEGER},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="electricExpand != null">
electric_expand = #{electricExpand,jdbcType=INTEGER},
</if>
<if test="expandMethod != null">
expand_method = #{expandMethod,jdbcType=INTEGER},
</if>
<if test="installPowerType != null">
install_power_type = #{installPowerType,jdbcType=VARCHAR},
</if>
<if test="installPowerRemark != null">
install_power_remark = #{installPowerRemark,jdbcType=VARCHAR},
</if>
<if test="installPowerPosition != null">
install_power_position = #{installPowerPosition,jdbcType=VARCHAR},
</if>
<if test="parkingNo != null">
parking_no = #{parkingNo,jdbcType=VARCHAR},
</if>
<if test="realInstallType != null">
real_install_type = #{realInstallType,jdbcType=INTEGER},
</if>
<if test="realCableType != null">
real_cable_type = #{realCableType,jdbcType=VARCHAR},
</if>
<if test="realCableMeter != null">
real_cable_meter = #{realCableMeter,jdbcType=VARCHAR},
</if>
<if test="realCableInstallType != null">
real_cable_install_type = #{realCableInstallType,jdbcType=INTEGER},
</if>
<if test="predictOverItem != null">
predict_over_item = #{predictOverItem,jdbcType=VARCHAR},
</if>
<if test="predictTotalFee != null">
predict_total_fee = #{predictTotalFee,jdbcType=DECIMAL},
</if>
<if test="debugCheck != null">
debug_check = #{debugCheck,jdbcType=VARCHAR},
</if>
<if test="attachment != null">
attachment = #{attachment,jdbcType=VARCHAR},
</if>
<if test="trainContent != null">
train_content = #{trainContent,jdbcType=VARCHAR},
</if>
<if test="installRemark != null">
install_remark = #{installRemark,jdbcType=VARCHAR},
</if>
<if test="userWallboxPic != null">
user_wallbox_pic = #{userWallboxPic,jdbcType=VARCHAR},
</if>
<if test="wallboxNameplatePic != null">
wallbox_nameplate_pic = #{wallboxNameplatePic,jdbcType=VARCHAR},
</if>
<if test="voidOpenPic != null">
void_open_pic = #{voidOpenPic,jdbcType=VARCHAR},
</if>
<if test="leakageProtectPic != null">
leakage_protect_pic = #{leakageProtectPic,jdbcType=VARCHAR},
</if>
<if test="clientRate != null">
client_rate = #{clientRate,jdbcType=INTEGER},
</if>
<if test="clientSignature != null">
client_signature = #{clientSignature,jdbcType=VARCHAR},
</if>
<if test="installAttachmentFiles != null">
install_attachment_files = #{installAttachmentFiles,jdbcType=VARCHAR},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where order_id = #{orderId}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.OrderMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Order">
<id column="id" jdbcType="VARCHAR" property="id"/>
<result column="oem_id" jdbcType="INTEGER" property="oemId"/>
<result column="oem_agent_id" jdbcType="INTEGER" property="oemAgentId"/>
<result column="oem_agent_info" jdbcType="VARCHAR" property="oemAgentInfo"/>
<result column="oem_agent_contact_name" jdbcType="VARCHAR" property="oemAgentContactName"/>
<result column="oem_agent_contact_phone" jdbcType="VARCHAR" property="oemAgentContactPhone"/>
<result column="out_order_id" jdbcType="VARCHAR" property="outOrderId"/>
<result column="contract_id" jdbcType="INTEGER" property="contractId"/>
<result column="supplier_contract_id" jdbcType="INTEGER" property="supplierContractId"/>
<result column="user_name" jdbcType="VARCHAR" property="userName"/>
<result column="user_phone" jdbcType="VARCHAR" property="userPhone"/>
<result column="user_sex" jdbcType="INTEGER" property="userSex"/>
<result column="contact_name" jdbcType="VARCHAR" property="contactName"/>
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone"/>
<result column="region_id" jdbcType="VARCHAR" property="regionId"/>
<result column="warehouse_id" jdbcType="VARCHAR" property="warehouseId"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="vehicle_model" jdbcType="VARCHAR" property="vehicleModel"/>
<result column="vehicle_chassis_no" jdbcType="VARCHAR" property="vehicleChassisNo"/>
<result column="vehicle_vin" jdbcType="VARCHAR" property="vehicleVin"/>
<result column="vehicle_parking_no" jdbcType="VARCHAR" property="vehicleParkingNo"/>
<result column="vehicle_parking_status" jdbcType="VARCHAR" property="vehicleParkingStatus"/>
<result column="survey_before_sale_enable" jdbcType="INTEGER" property="surveyBeforeSaleEnable"/>
<result column="manu_dispatch_enable" jdbcType="INTEGER" property="manuDispatchEnable"/>
<result column="wallbox_model" jdbcType="VARCHAR" property="wallboxModel"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="type" jdbcType="INTEGER" property="type"/>
<result column="expand_status" jdbcType="INTEGER" property="expandStatus"/>
<result column="expand_fail_reason" jdbcType="VARCHAR" property="expandFailReason"/>
<result column="expand_fail_operate" jdbcType="INTEGER" property="expandFailOperate"/>
<result column="expand_remark" jdbcType="VARCHAR" property="expandRemark"/>
<result column="survey_staff_id" jdbcType="INTEGER" property="surveyStaffId"/>
<result column="survey_finish_time" jdbcType="TIMESTAMP" property="surveyFinishTime"/>
<result column="survey_reserve_time" jdbcType="TIMESTAMP" property="surveyReserveTime"/>
<result column="survey_client_name" jdbcType="VARCHAR" property="surveyClientName"/>
<result column="survey_client_phone" jdbcType="VARCHAR" property="surveyClientPhone"/>
<result column="survey_cams_phone" jdbcType="VARCHAR" property="surveyCamsPhone"/>
<result column="survey_reserve_remark" jdbcType="VARCHAR" property="surveyReserveRemark"/>
<result column="install_supplier_id" jdbcType="INTEGER" property="installSupplierId"/>
<result column="install_staff_id" jdbcType="INTEGER" property="installStaffId"/>
<result column="install_finish_time" jdbcType="TIMESTAMP" property="installFinishTime"/>
<result column="install_reserve_time" jdbcType="TIMESTAMP" property="installReserveTime"/>
<result column="install_client_name" jdbcType="VARCHAR" property="installClientName"/>
<result column="install_client_phone" jdbcType="VARCHAR" property="installClientPhone"/>
<result column="install_cams_phone" jdbcType="VARCHAR" property="installCamsPhone"/>
<result column="install_reserve_remark" jdbcType="VARCHAR" property="installReserveRemark"/>
<result column="survey_finish_fail_reason" jdbcType="VARCHAR" property="surveyFinishFailReason"/>
<result column="survey_rectify_fail_reason" jdbcType="VARCHAR" property="surveyRectifyFailReason"/>
<result column="install_change_fail_reason" jdbcType="VARCHAR" property="installChangeFailReason"/>
<result column="install_finish_fail_reason" jdbcType="VARCHAR" property="installFinishFailReason"/>
<result column="install_rectify_fail_reason" jdbcType="VARCHAR" property="installRectifyFailReason"/>
<result column="close_order_reason" jdbcType="VARCHAR" property="closeOrderReason"/>
<result column="install_change_attachment_files" jdbcType="VARCHAR" property="installChangeAttachmentFiles"/>
<result column="survey_reserve_fail_info" jdbcType="VARCHAR" property="surveyReserveFailInfo"/>
<result column="install_reserve_fail_info" jdbcType="VARCHAR" property="installReserveFailInfo"/>
<result column="files" jdbcType="VARCHAR" property="files"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
<result column="score" jdbcType="DECIMAL" property="score"/>
<result column="visit_content" jdbcType="VARCHAR" property="visitContent"/>
<result column="invoice_time" jdbcType="TIMESTAMP" property="invoiceTime"/>
<result column="estate_type" jdbcType="INTEGER" property="estateType"/>
<result column="has_independent_parking" jdbcType="INTEGER" property="hasIndependentParking"/>
<result column="install_position" jdbcType="INTEGER" property="installPosition"/>
<result column="property_agree" jdbcType="INTEGER" property="propertyAgree"/>
<result column="electric_expand" jdbcType="INTEGER" property="electricExpand"/>
<result column="need_erect_pile" jdbcType="INTEGER" property="needErectPile"/>
<result column="dispatch_time" jdbcType="TIMESTAMP" property="dispatchTime"/>
<result column="survey_submit_examine_time" jdbcType="TIMESTAMP" property="surveySubmitExamineTime"/>
<result column="survey_approve_time" jdbcType="TIMESTAMP" property="surveyApproveTime"/>
<result column="install_submit_examine_time" jdbcType="TIMESTAMP" property="installSubmitExamineTime"/>
<result column="install_approve_time" jdbcType="TIMESTAMP" property="installApproveTime"/>
<result column="return_visit_time" jdbcType="TIMESTAMP" property="returnVisitTime"/>
<result column="close_time" jdbcType="TIMESTAMP" property="closeTime"/>
<result column="create_account" jdbcType="VARCHAR" property="createAccount"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount"/>
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/>
<result column="item_model" jdbcType="VARCHAR" property="itemModel"/>
<result column="survey_wallbox_model" jdbcType="VARCHAR" property="surveyWallboxModel"/>
<result column="survey_item_model" jdbcType="VARCHAR" property="surveyItemModel"/>
<result column="install_wallbox_model" jdbcType="VARCHAR" property="installWallboxModel"/>
<result column="install_item_model" jdbcType="VARCHAR" property="installItemModel"/>
<result column="survey_follow_time" jdbcType="TIMESTAMP" property="surveyFollowTime"/>
<result column="install_follow_time" jdbcType="TIMESTAMP" property="installFollowTime"/>
<result column="address_lat" jdbcType="VARCHAR" property="addressLat"/>
<result column="address_lng" jdbcType="VARCHAR" property="addressLng"/>
<result column="connect_person" property="connectPerson" jdbcType="VARCHAR"/>
<result column="want_home_time" property="wantHomeTime" jdbcType="TIMESTAMP"/>
<result column="install_emergency_level" property="installEmergencyLevel" jdbcType="INTEGER"/>
<result column="remark" property="remark" jdbcType="VARCHAR"/>
<result column="is_connect" property="isConnect" jdbcType="INTEGER"/>
<result column="is_need_survey" property="isNeedSurvey" jdbcType="INTEGER"/>
<result column="shipno" property="shipno" jdbcType="VARCHAR"/>
<result column="pack_type" property="packType" jdbcType="VARCHAR"/>
<result column="oem_agent_name" property="oemAgentName" jdbcType="VARCHAR"/>
<result column="install_supplier_name" property="installSupplierName" jdbcType="VARCHAR"/>
<result column="survey_staff_name" property="surveyStaffName" jdbcType="VARCHAR"/>
<result column="survey_staff_phone" property="surveyStaffPhone" jdbcType="VARCHAR"/>
<result column="install_staff_name" property="installStaffName" jdbcType="VARCHAR"/>
<result column="install_staff_phone" property="installStaffPhone" jdbcType="VARCHAR"/>
<result column="oem_agent_code" property="oemAgentCode" jdbcType="VARCHAR"/>
<result column="install_pack_type" property="installPackType" jdbcType="VARCHAR"/>
<result column="survey_pack_type" property="surveyPackType" jdbcType="VARCHAR"/>
<result column="know_after_sales_channel" property="knowAfterSalesChannel" jdbcType="INTEGER"/>
<result column="install_length" property="installLength" jdbcType="INTEGER"/>
</resultMap>
<sql id="Order_Column_List">
t
.
id
, t.oem_id, t.oem_agent_id, t.oem_agent_contact_name,t.oem_agent_info, t.oem_agent_contact_phone, t.out_order_id,
t.contract_id, t.supplier_contract_id, t.user_name, t.user_phone, t.user_sex, t.contact_name,
t.contact_phone, case when t.region_level = 1 then t.country_id when t.region_level = 2 then t.area_id
when t.region_level=3 then t.province_id when t.region_level=5 then t.city_id else t.region_id
end
as region_id,
t.warehouse_id, t.address, t.vehicle_model, t.vehicle_chassis_no,
t.vehicle_vin, t.vehicle_parking_no, t.vehicle_parking_status, t.survey_before_sale_enable,
t.manu_dispatch_enable, t.wallbox_model, t.status, t.type, t.expand_status, t.expand_fail_reason,
t.expand_fail_operate, t.expand_remark, t.survey_staff_id, t.survey_finish_time, t.survey_reserve_time,
t.survey_client_name, t.survey_client_phone, t.survey_cams_phone, t.survey_reserve_remark,
t.install_supplier_id, t.install_staff_id, t.install_finish_time, t.install_reserve_time,
t.install_client_name, t.install_client_phone, t.install_cams_phone, t.install_reserve_remark,
t.survey_finish_fail_reason, t.survey_rectify_fail_reason, t.install_change_fail_reason,
t.install_finish_fail_reason, t.install_rectify_fail_reason, t.close_order_reason, t.install_change_attachment_files,
t.survey_reserve_fail_info, t.install_reserve_fail_info, t.files, t.description, t.score, t.visit_content,
t.invoice_time, t.estate_type, t.has_independent_parking, t.install_position, t.property_agree,
t.electric_expand, t.need_erect_pile, t.dispatch_time, t.survey_submit_examine_time, t.survey_approve_time,
t.install_submit_examine_time, t.install_approve_time, t.return_visit_time, t.close_time,
t.create_account, t.create_time, t.modify_account, t.modify_time,
t.item_model,t.survey_wallbox_model,t.survey_item_model,t.install_wallbox_model,t.install_item_model,
t.survey_follow_time,t.install_follow_time,t.address_lat,t.address_lng,
t.connect_person, t.want_home_time, t.install_emergency_level, t.remark, t.is_connect,t.is_need_survey,t.shipno,
t.oem_agent_name,t.pack_type,t.install_supplier_name,t.survey_staff_name,t.survey_staff_phone,t.install_staff_name,
t.install_staff_phone,t.oem_agent_code,t.install_pack_type,t.survey_pack_type
</sql>
<sql id="Base_Column_List">
id
, oem_id, oem_agent_id, oem_agent_contact_name,oem_agent_info, oem_agent_contact_phone, out_order_id,
contract_id, supplier_contract_id, user_name, user_phone, user_sex, contact_name,
contact_phone, case when region_level = 1 then country_id when region_level = 2 then area_id
when region_level=3 then province_id when region_level=5 then city_id else region_id
end
as region_id,
warehouse_id, address, vehicle_model, vehicle_chassis_no,
vehicle_vin, vehicle_parking_no, vehicle_parking_status, survey_before_sale_enable,
manu_dispatch_enable, wallbox_model, status, type, expand_status, expand_fail_reason,
expand_fail_operate, expand_remark, survey_staff_id, survey_finish_time, survey_reserve_time,
survey_client_name, survey_client_phone, survey_cams_phone, survey_reserve_remark,
install_supplier_id, install_staff_id, install_finish_time, install_reserve_time,
install_client_name, install_client_phone, install_cams_phone, install_reserve_remark,
survey_finish_fail_reason, survey_rectify_fail_reason, install_change_fail_reason,
install_finish_fail_reason, install_rectify_fail_reason, close_order_reason, install_change_attachment_files,
survey_reserve_fail_info, install_reserve_fail_info, files, description, score, visit_content,
invoice_time, estate_type, has_independent_parking, install_position, property_agree,
electric_expand, need_erect_pile, dispatch_time, survey_submit_examine_time, survey_approve_time,
install_submit_examine_time, install_approve_time, return_visit_time, close_time,
create_account, create_time, modify_account, modify_time,
item_model,survey_wallbox_model,survey_item_model,install_wallbox_model,install_item_model,
survey_follow_time,install_follow_time,address_lat,address_lng,
connect_person, want_home_time, install_emergency_level, remark, is_connect,is_need_survey,shipno,
oem_agent_name,pack_type,install_supplier_name,survey_staff_name,survey_staff_phone,install_staff_name,
install_staff_phone,oem_agent_code,install_pack_type,survey_pack_type,know_after_sales_channel,install_length
</sql>
<delete id="delete" parameterType="java.lang.String">
delete
from t_order
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Order">
insert into t_order (id, oem_id, oem_agent_id,
oem_agent_info, oem_agent_contact_name, oem_agent_contact_phone,
out_order_id, contract_id, supplier_contract_id,
user_name, user_phone, user_sex,
contact_name, contact_phone, region_id,
warehouse_id, address, vehicle_model,
vehicle_chassis_no, vehicle_vin, vehicle_parking_no,
vehicle_parking_status, survey_before_sale_enable,
manu_dispatch_enable, wallbox_model, status,
type, expand_status, expand_fail_reason,
expand_fail_operate, expand_remark, survey_staff_id,
survey_finish_time, survey_reserve_time,
survey_client_name, survey_client_phone, survey_cams_phone,
survey_reserve_remark, install_supplier_id,
install_staff_id, install_finish_time, install_reserve_time,
install_client_name, install_client_phone,
install_cams_phone, install_reserve_remark,
survey_finish_fail_reason, survey_rectify_fail_reason,
install_change_fail_reason, install_finish_fail_reason,
install_rectify_fail_reason, close_order_reason,
install_change_attachment_files, survey_reserve_fail_info,
install_reserve_fail_info, files, description,
score, visit_content, invoice_time,
estate_type, has_independent_parking, install_position,
property_agree, electric_expand, need_erect_pile,
dispatch_time, survey_submit_examine_time,
survey_approve_time, install_submit_examine_time,
install_approve_time, return_visit_time,
close_time, create_account, create_time,
modify_account, modify_time, item_model,
survey_wallbox_model, survey_item_model, install_wallbox_model,
install_item_model, survey_follow_time, install_follow_time,
address_lat, address_lng, connect_person,
want_home_time, install_emergency_level,
remark, is_connect, is_need_survey,
shipno)
values (#{id,jdbcType=VARCHAR}, #{oemId,jdbcType=INTEGER}, #{oemAgentId,jdbcType=INTEGER},
#{oemAgentInfo,jdbcType=VARCHAR}, #{oemAgentContactName,jdbcType=VARCHAR},
#{oemAgentContactPhone,jdbcType=VARCHAR},
#{outOrderId,jdbcType=VARCHAR}, #{contractId,jdbcType=INTEGER}, #{supplierContractId,jdbcType=INTEGER},
#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, #{userSex,jdbcType=INTEGER},
#{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR}, #{regionId,jdbcType=VARCHAR},
#{warehouseId,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{vehicleModel,jdbcType=VARCHAR},
#{vehicleChassisNo,jdbcType=VARCHAR}, #{vehicleVin,jdbcType=VARCHAR},
#{vehicleParkingNo,jdbcType=VARCHAR},
#{vehicleParkingStatus,jdbcType=VARCHAR}, #{surveyBeforeSaleEnable,jdbcType=BIT},
#{manuDispatchEnable,jdbcType=BIT}, #{wallboxModel,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{type,jdbcType=BIT}, #{expandStatus,jdbcType=BIT}, #{expandFailReason,jdbcType=VARCHAR},
#{expandFailOperate,jdbcType=INTEGER}, #{expandRemark,jdbcType=VARCHAR},
#{surveyStaffId,jdbcType=INTEGER},
#{surveyFinishTime,jdbcType=TIMESTAMP}, #{surveyReserveTime,jdbcType=TIMESTAMP},
#{surveyClientName,jdbcType=VARCHAR}, #{surveyClientPhone,jdbcType=VARCHAR},
#{surveyCamsPhone,jdbcType=VARCHAR},
#{surveyReserveRemark,jdbcType=VARCHAR}, #{installSupplierId,jdbcType=INTEGER},
#{installStaffId,jdbcType=INTEGER}, #{installFinishTime,jdbcType=TIMESTAMP},
#{installReserveTime,jdbcType=TIMESTAMP},
#{installClientName,jdbcType=VARCHAR}, #{installClientPhone,jdbcType=VARCHAR},
#{installCamsPhone,jdbcType=VARCHAR}, #{installReserveRemark,jdbcType=VARCHAR},
#{surveyFinishFailReason,jdbcType=VARCHAR}, #{surveyRectifyFailReason,jdbcType=VARCHAR},
#{installChangeFailReason,jdbcType=VARCHAR}, #{installFinishFailReason,jdbcType=VARCHAR},
#{installRectifyFailReason,jdbcType=VARCHAR}, #{closeOrderReason,jdbcType=VARCHAR},
#{installChangeAttachmentFiles,jdbcType=VARCHAR}, #{surveyReserveFailInfo,jdbcType=VARCHAR},
#{installReserveFailInfo,jdbcType=VARCHAR}, #{files,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{score,jdbcType=DECIMAL}, #{visitContent,jdbcType=VARCHAR}, #{invoiceTime,jdbcType=TIMESTAMP},
#{estateType,jdbcType=BIT}, #{hasIndependentParking,jdbcType=BIT}, #{installPosition,jdbcType=BIT},
#{propertyAgree,jdbcType=BIT}, #{electricExpand,jdbcType=BIT}, #{needErectPile,jdbcType=BIT},
#{dispatchTime,jdbcType=TIMESTAMP}, #{surveySubmitExamineTime,jdbcType=TIMESTAMP},
#{surveyApproveTime,jdbcType=TIMESTAMP}, #{installSubmitExamineTime,jdbcType=TIMESTAMP},
#{installApproveTime,jdbcType=TIMESTAMP}, #{returnVisitTime,jdbcType=TIMESTAMP},
#{closeTime,jdbcType=TIMESTAMP}, #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{itemModel,jdbcType=VARCHAR},
#{surveyWallboxModel,jdbcType=VARCHAR}, #{surveyItemModel,jdbcType=VARCHAR},
#{installWallboxModel,jdbcType=VARCHAR},
#{installItemModel,jdbcType=VARCHAR}, #{surveyFollowTime,jdbcType=TIMESTAMP},
#{installFollowTime,jdbcType=TIMESTAMP},
#{addressLat,jdbcType=VARCHAR}, #{addressLng,jdbcType=VARCHAR}, #{connectPerson,jdbcType=VARCHAR},
#{wantHomeTime,jdbcType=TIMESTAMP}, #{installEmergencyLevel,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR}, #{isConnect,jdbcType=INTEGER}, #{isNeedSurvey,jdbcType=INTEGER},
#{shipno,jdbcType=VARCHAR})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Order">
insert into t_order
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="oemId != null">
oem_id,
</if>
<if test="oemAgentId != null">
oem_agent_id,
</if>
<if test="oemAgentContactName != null">
oem_agent_contact_name,
</if>
<if test="oemAgentInfo != null">
oem_agent_info,
</if>
<if test="oemAgentContactPhone != null">
oem_agent_contact_phone,
</if>
<if test="outOrderId != null">
out_order_id,
</if>
<if test="contractId != null">
contract_id,
</if>
<if test="supplierContractId != null">
supplier_contract_id,
</if>
<if test="userName != null">
user_name,
</if>
<if test="userPhone != null">
user_phone,
</if>
<if test="userSex != null">
user_sex,
</if>
<if test="contactName != null">
contact_name,
</if>
<if test="contactPhone != null">
contact_phone,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="warehouseId != null">
warehouse_id,
</if>
<if test="address != null">
address,
</if>
<if test="vehicleModel != null">
vehicle_model,
</if>
<if test="vehicleChassisNo != null">
vehicle_chassis_no,
</if>
<if test="vehicleVin != null">
vehicle_vin,
</if>
<if test="vehicleParkingNo != null">
vehicle_parking_no,
</if>
<if test="vehicleParkingStatus != null">
vehicle_parking_status,
</if>
<if test="surveyBeforeSaleEnable != null">
survey_before_sale_enable,
</if>
<if test="manuDispatchEnable != null">
manu_dispatch_enable,
</if>
<if test="wallboxModel != null">
wallbox_model,
</if>
<if test="status != null">
status,
</if>
<if test="type != null">
type,
</if>
<if test="expandStatus != null">
expand_status,
</if>
<if test="expandFailReason != null">
expand_fail_reason,
</if>
<if test="expandFailOperate != null">
expand_fail_operate,
</if>
<if test="expandRemark != null">
expand_remark,
</if>
<if test="surveyStaffId != null">
survey_staff_id,
</if>
<if test="surveyFinishTime != null">
survey_finish_time,
</if>
<if test="surveyReserveTime != null">
survey_reserve_time,
</if>
<if test="surveyClientName != null">
survey_client_name,
</if>
<if test="surveyClientPhone != null">
survey_client_phone,
</if>
<if test="surveyCamsPhone != null">
survey_cams_phone,
</if>
<if test="surveyReserveRemark != null">
survey_reserve_remark,
</if>
<if test="installSupplierId != null">
install_supplier_id,
</if>
<if test="installStaffId != null">
install_staff_id,
</if>
<if test="installFinishTime != null">
install_finish_time,
</if>
<if test="installReserveTime != null">
install_reserve_time,
</if>
<if test="installClientName != null">
install_client_name,
</if>
<if test="installClientPhone != null">
install_client_phone,
</if>
<if test="installCamsPhone != null">
install_cams_phone,
</if>
<if test="installReserveRemark != null">
install_reserve_remark,
</if>
<if test="surveyFinishFailReason != null">
survey_finish_fail_reason,
</if>
<if test="surveyRectifyFailReason != null">
survey_rectify_fail_reason,
</if>
<if test="installChangeFailReason != null">
install_change_fail_reason,
</if>
<if test="installFinishFailReason != null">
install_finish_fail_reason,
</if>
<if test="installRectifyFailReason != null">
install_rectify_fail_reason,
</if>
<if test="closeOrderReason != null">
close_order_reason,
</if>
<if test="installChangeAttachmentFiles != null">
install_change_attachment_files,
</if>
<if test="surveyReserveFailInfo != null">
survey_reserve_fail_info,
</if>
<if test="installReserveFailInfo != null">
install_reserve_fail_info,
</if>
<if test="files != null">
files,
</if>
<if test="description != null">
description,
</if>
<if test="score != null">
score,
</if>
<if test="visitContent != null">
visit_content,
</if>
<if test="invoiceTime != null">
invoice_time,
</if>
<if test="estateType != null">
estate_type,
</if>
<if test="hasIndependentParking != null">
has_independent_parking,
</if>
<if test="installPosition != null">
install_position,
</if>
<if test="propertyAgree != null">
property_agree,
</if>
<if test="electricExpand != null">
electric_expand,
</if>
<if test="needErectPile != null">
need_erect_pile,
</if>
<if test="dispatchTime != null">
dispatch_time,
</if>
<if test="surveySubmitExamineTime != null">
survey_submit_examine_time,
</if>
<if test="surveyApproveTime != null">
survey_approve_time,
</if>
<if test="installSubmitExamineTime != null">
install_submit_examine_time,
</if>
<if test="installApproveTime != null">
install_approve_time,
</if>
<if test="returnVisitTime != null">
return_visit_time,
</if>
<if test="closeTime != null">
close_time,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
<if test="itemModel != null">
item_model,
</if>
<if test="surveyWallboxModel != null">
survey_wallbox_model,
</if>
<if test="surveyItemModel != null">
survey_item_model,
</if>
<if test="installWallboxModel != null">
install_wallbox_model,
</if>
<if test="installItemModel != null">
install_item_model,
</if>
<if test="surveyFollowTime != null">
surveyFollowTime,
</if>
<if test="installFollowTime != null">
installFollowTime,
</if>
<if test="addressLat != null">
address_lat,
</if>
<if test="addressLng != null">
address_lng,
</if>
<if test="connectPerson != null">
connect_person,
</if>
<if test="wantHomeTime != null">
want_home_time,
</if>
<if test="installEmergencyLevel != null">
install_emergency_level,
</if>
<if test="remark != null">
remark,
</if>
<if test="isConnect != null">
is_connect,
</if>
<if test="isNeedSurvey != null">
is_need_survey,
</if>
<if test="shipno != null">
shipno,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="oemId != null">
#{oemId,jdbcType=INTEGER},
</if>
<if test="oemAgentId != null">
#{oemAgentId,jdbcType=INTEGER},
</if>
<if test="oemAgentInfo != null">
#{oemAgentInfo,jdbcType=VARCHAR},
</if>
<if test="oemAgentContactName != null">
#{oemAgentContactName,jdbcType=VARCHAR},
</if>
<if test="oemAgentContactPhone != null">
#{oemAgentContactPhone,jdbcType=VARCHAR},
</if>
<if test="outOrderId != null">
#{outOrderId,jdbcType=VARCHAR},
</if>
<if test="contractId != null">
#{contractId,jdbcType=INTEGER},
</if>
<if test="supplierContractId != null">
#{supplierContractId,jdbcType=INTEGER},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
#{userPhone,jdbcType=VARCHAR},
</if>
<if test="userSex != null">
#{userSex,jdbcType=INTEGER},
</if>
<if test="contactName != null">
#{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
#{contactPhone,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
#{regionId,jdbcType=VARCHAR},
</if>
<if test="warehouseId != null">
#{warehouseId,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="vehicleModel != null">
#{vehicleModel,jdbcType=VARCHAR},
</if>
<if test="vehicleChassisNo != null">
#{vehicleChassisNo,jdbcType=VARCHAR},
</if>
<if test="vehicleVin != null">
#{vehicleVin,jdbcType=VARCHAR},
</if>
<if test="vehicleParkingNo != null">
#{vehicleParkingNo,jdbcType=VARCHAR},
</if>
<if test="vehicleParkingStatus != null">
#{vehicleParkingStatus,jdbcType=VARCHAR},
</if>
<if test="surveyBeforeSaleEnable != null">
#{surveyBeforeSaleEnable,jdbcType=INTEGER},
</if>
<if test="manuDispatchEnable != null">
#{manuDispatchEnable,jdbcType=INTEGER},
</if>
<if test="wallboxModel != null">
#{wallboxModel,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="expandStatus != null">
#{expandStatus,jdbcType=INTEGER},
</if>
<if test="expandFailReason != null">
#{expandFailReason,jdbcType=VARCHAR},
</if>
<if test="expandFailOperate != null">
#{expandFailOperate,jdbcType=INTEGER},
</if>
<if test="expandRemark != null">
#{expandRemark,jdbcType=VARCHAR},
</if>
<if test="surveyStaffId != null">
#{surveyStaffId,jdbcType=INTEGER},
</if>
<if test="surveyFinishTime != null">
#{surveyFinishTime,jdbcType=TIMESTAMP},
</if>
<if test="surveyReserveTime != null">
#{surveyReserveTime,jdbcType=TIMESTAMP},
</if>
<if test="surveyClientName != null">
#{surveyClientName,jdbcType=VARCHAR},
</if>
<if test="surveyClientPhone != null">
#{surveyClientPhone,jdbcType=VARCHAR},
</if>
<if test="surveyCamsPhone != null">
#{surveyCamsPhone,jdbcType=VARCHAR},
</if>
<if test="surveyReserveRemark != null">
#{surveyReserveRemark,jdbcType=VARCHAR},
</if>
<if test="installSupplierId != null">
#{installSupplierId,jdbcType=INTEGER},
</if>
<if test="installStaffId != null">
#{installStaffId,jdbcType=INTEGER},
</if>
<if test="installFinishTime != null">
#{installFinishTime,jdbcType=TIMESTAMP},
</if>
<if test="installReserveTime != null">
#{installReserveTime,jdbcType=TIMESTAMP},
</if>
<if test="installClientName != null">
#{installClientName,jdbcType=VARCHAR},
</if>
<if test="installClientPhone != null">
#{installClientPhone,jdbcType=VARCHAR},
</if>
<if test="installCamsPhone != null">
#{installCamsPhone,jdbcType=VARCHAR},
</if>
<if test="installReserveRemark != null">
#{installReserveRemark,jdbcType=VARCHAR},
</if>
<if test="surveyFinishFailReason != null">
#{surveyFinishFailReason,jdbcType=VARCHAR},
</if>
<if test="surveyRectifyFailReason != null">
#{surveyRectifyFailReason,jdbcType=VARCHAR},
</if>
<if test="installChangeFailReason != null">
#{installChangeFailReason,jdbcType=VARCHAR},
</if>
<if test="installFinishFailReason != null">
#{installFinishFailReason,jdbcType=VARCHAR},
</if>
<if test="installRectifyFailReason != null">
#{installRectifyFailReason,jdbcType=VARCHAR},
</if>
<if test="closeOrderReason != null">
#{closeOrderReason,jdbcType=VARCHAR},
</if>
<if test="installChangeAttachmentFiles != null">
#{installChangeAttachmentFiles,jdbcType=VARCHAR},
</if>
<if test="surveyReserveFailInfo != null">
#{surveyReserveFailInfo,jdbcType=VARCHAR},
</if>
<if test="installReserveFailInfo != null">
#{installReserveFailInfo,jdbcType=VARCHAR},
</if>
<if test="files != null">
#{files,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="score != null">
#{score,jdbcType=DECIMAL},
</if>
<if test="visitContent != null">
#{visitContent,jdbcType=VARCHAR},
</if>
<if test="invoiceTime != null">
#{invoiceTime,jdbcType=TIMESTAMP},
</if>
<if test="estateType != null">
#{estateType,jdbcType=INTEGER},
</if>
<if test="hasIndependentParking != null">
#{hasIndependentParking,jdbcType=INTEGER},
</if>
<if test="installPosition != null">
#{installPosition,jdbcType=INTEGER},
</if>
<if test="propertyAgree != null">
#{propertyAgree,jdbcType=INTEGER},
</if>
<if test="electricExpand != null">
#{electricExpand,jdbcType=INTEGER},
</if>
<if test="needErectPile != null">
#{needErectPile,jdbcType=INTEGER},
</if>
<if test="dispatchTime != null">
#{dispatchTime,jdbcType=TIMESTAMP},
</if>
<if test="surveySubmitExamineTime != null">
#{surveySubmitExamineTime,jdbcType=TIMESTAMP},
</if>
<if test="surveyApproveTime != null">
#{surveyApproveTime,jdbcType=TIMESTAMP},
</if>
<if test="installSubmitExamineTime != null">
#{installSubmitExamineTime,jdbcType=TIMESTAMP},
</if>
<if test="installApproveTime != null">
#{installApproveTime,jdbcType=TIMESTAMP},
</if>
<if test="returnVisitTime != null">
#{returnVisitTime,jdbcType=TIMESTAMP},
</if>
<if test="closeTime != null">
#{closeTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="itemModel != null">
#{itemModel,jdbcType=VARCHAR},
</if>
<if test="surveyWallboxModel != null">
#{surveyWallboxModel,jdbcType=VARCHAR},
</if>
<if test="surveyItemModel != null">
#{surveyItemModel,jdbcType=VARCHAR},
</if>
<if test="installWallboxModel != null">
#{installWallboxModel,jdbcType=VARCHAR},
</if>
<if test="installItemModel != null">
#{installItemModel,jdbcType=VARCHAR},
</if>
<if test="surveyFollowTime != null">
#{surveyFollowTime,jdbcType=TIMESTAMP},
</if>
<if test="installFollowTime != null">
#{installFollowTime,jdbcType=TIMESTAMP},
</if>
<if test="addressLat != null">
#{addressLat,jdbcType=VARCHAR},
</if>
<if test="addressLng != null">
#{addressLng,jdbcType=VARCHAR},
</if>
<if test="connectPerson != null">
#{connectPerson,jdbcType=VARCHAR},
</if>
<if test="wantHomeTime != null">
#{wantHomeTime,jdbcType=TIMESTAMP},
</if>
<if test="installEmergencyLevel != null">
#{installEmergencyLevel,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="isConnect != null">
#{isConnect,jdbcType=INTEGER},
</if>
<if test="isNeedSurvey != null">
#{isNeedSurvey,jdbcType=INTEGER},
</if>
<if test="shipno != null">
#{shipno,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Order">
update t_order
<set>
<if test="oemId != null">
oem_id = #{oemId,jdbcType=INTEGER},
</if>
<if test="oemAgentId != null">
oem_agent_id = #{oemAgentId,jdbcType=INTEGER},
</if>
<if test="oemAgentInfo != null">
oem_agent_info = #{oemAgentInfo,jdbcType=VARCHAR},
</if>
<if test="oemAgentContactName != null">
oem_agent_contact_name = #{oemAgentContactName,jdbcType=VARCHAR},
</if>
<if test="oemAgentContactPhone != null">
oem_agent_contact_phone = #{oemAgentContactPhone,jdbcType=VARCHAR},
</if>
<if test="outOrderId != null">
out_order_id = #{outOrderId,jdbcType=VARCHAR},
</if>
<if test="contractId != null">
contract_id = #{contractId,jdbcType=INTEGER},
</if>
<if test="supplierContractId != null">
supplier_contract_id = #{supplierContractId,jdbcType=INTEGER},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
user_phone = #{userPhone,jdbcType=VARCHAR},
</if>
<if test="userSex != null">
user_sex = #{userSex,jdbcType=INTEGER},
</if>
<if test="contactName != null">
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
contact_phone = #{contactPhone,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=VARCHAR},
</if>
<if test="warehouseId != null">
warehouse_id = #{warehouseId,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="vehicleModel != null">
vehicle_model = #{vehicleModel,jdbcType=VARCHAR},
</if>
<if test="vehicleChassisNo != null">
vehicle_chassis_no = #{vehicleChassisNo,jdbcType=VARCHAR},
</if>
<if test="vehicleVin != null">
vehicle_vin = #{vehicleVin,jdbcType=VARCHAR},
</if>
<if test="vehicleParkingNo != null">
vehicle_parking_no = #{vehicleParkingNo,jdbcType=VARCHAR},
</if>
<if test="vehicleParkingStatus != null">
vehicle_parking_status = #{vehicleParkingStatus,jdbcType=VARCHAR},
</if>
<if test="surveyBeforeSaleEnable != null">
survey_before_sale_enable = #{surveyBeforeSaleEnable,jdbcType=INTEGER},
</if>
<if test="manuDispatchEnable != null">
manu_dispatch_enable = #{manuDispatchEnable,jdbcType=INTEGER},
</if>
<if test="wallboxModel != null">
wallbox_model = #{wallboxModel,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="expandStatus != null">
expand_status = #{expandStatus,jdbcType=INTEGER},
</if>
<if test="expandFailReason != null">
expand_fail_reason = #{expandFailReason,jdbcType=VARCHAR},
</if>
<if test="expandFailOperate != null">
expand_fail_operate = #{expandFailOperate,jdbcType=INTEGER},
</if>
<if test="expandRemark != null">
expand_remark = #{expandRemark,jdbcType=VARCHAR},
</if>
<if test="surveyStaffId != null">
survey_staff_id = #{surveyStaffId,jdbcType=INTEGER},
</if>
<if test="surveyFinishTime != null">
survey_finish_time = #{surveyFinishTime,jdbcType=TIMESTAMP},
</if>
<if test="surveyReserveTime != null">
survey_reserve_time = #{surveyReserveTime,jdbcType=TIMESTAMP},
</if>
<if test="surveyClientName != null">
survey_client_name = #{surveyClientName,jdbcType=VARCHAR},
</if>
<if test="surveyClientPhone != null">
survey_client_phone = #{surveyClientPhone,jdbcType=VARCHAR},
</if>
<if test="surveyCamsPhone != null">
survey_cams_phone = #{surveyCamsPhone,jdbcType=VARCHAR},
</if>
<if test="surveyReserveRemark != null">
survey_reserve_remark = #{surveyReserveRemark,jdbcType=VARCHAR},
</if>
<if test="installSupplierId != null">
install_supplier_id = #{installSupplierId,jdbcType=INTEGER},
</if>
<if test="installStaffId != null">
install_staff_id = #{installStaffId,jdbcType=INTEGER},
</if>
<if test="installFinishTime != null">
install_finish_time = #{installFinishTime,jdbcType=TIMESTAMP},
</if>
<if test="installReserveTime != null">
install_reserve_time = #{installReserveTime,jdbcType=TIMESTAMP},
</if>
<if test="installClientName != null">
install_client_name = #{installClientName,jdbcType=VARCHAR},
</if>
<if test="installClientPhone != null">
install_client_phone = #{installClientPhone,jdbcType=VARCHAR},
</if>
<if test="installCamsPhone != null">
install_cams_phone = #{installCamsPhone,jdbcType=VARCHAR},
</if>
<if test="installReserveRemark != null">
install_reserve_remark = #{installReserveRemark,jdbcType=VARCHAR},
</if>
<if test="surveyFinishFailReason != null">
survey_finish_fail_reason = #{surveyFinishFailReason,jdbcType=VARCHAR},
</if>
<if test="surveyRectifyFailReason != null">
survey_rectify_fail_reason = #{surveyRectifyFailReason,jdbcType=VARCHAR},
</if>
<if test="installChangeFailReason != null">
install_change_fail_reason = #{installChangeFailReason,jdbcType=VARCHAR},
</if>
<if test="installFinishFailReason != null">
install_finish_fail_reason = #{installFinishFailReason,jdbcType=VARCHAR},
</if>
<if test="installRectifyFailReason != null">
install_rectify_fail_reason = #{installRectifyFailReason,jdbcType=VARCHAR},
</if>
<if test="closeOrderReason != null">
close_order_reason = #{closeOrderReason,jdbcType=VARCHAR},
</if>
<if test="installChangeAttachmentFiles != null">
install_change_attachment_files = #{installChangeAttachmentFiles,jdbcType=VARCHAR},
</if>
<if test="surveyReserveFailInfo != null">
survey_reserve_fail_info = #{surveyReserveFailInfo,jdbcType=VARCHAR},
</if>
<if test="installReserveFailInfo != null">
install_reserve_fail_info = #{installReserveFailInfo,jdbcType=VARCHAR},
</if>
<if test="files != null">
files = #{files,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="score != null">
score = #{score,jdbcType=DECIMAL},
</if>
<if test="visitContent != null">
visit_content = #{visitContent,jdbcType=VARCHAR},
</if>
<if test="invoiceTime != null">
invoice_time = #{invoiceTime,jdbcType=TIMESTAMP},
</if>
<if test="estateType != null">
estate_type = #{estateType,jdbcType=INTEGER},
</if>
<if test="hasIndependentParking != null">
has_independent_parking = #{hasIndependentParking,jdbcType=INTEGER},
</if>
<if test="installPosition != null">
install_position = #{installPosition,jdbcType=INTEGER},
</if>
<if test="propertyAgree != null">
property_agree = #{propertyAgree,jdbcType=INTEGER},
</if>
<if test="electricExpand != null">
electric_expand = #{electricExpand,jdbcType=INTEGER},
</if>
<if test="needErectPile != null">
need_erect_pile = #{needErectPile,jdbcType=INTEGER},
</if>
<if test="dispatchTime != null">
dispatch_time = #{dispatchTime,jdbcType=TIMESTAMP},
</if>
<if test="surveySubmitExamineTime != null">
survey_submit_examine_time = #{surveySubmitExamineTime,jdbcType=TIMESTAMP},
</if>
<if test="surveyApproveTime != null">
survey_approve_time = #{surveyApproveTime,jdbcType=TIMESTAMP},
</if>
<if test="installSubmitExamineTime != null">
install_submit_examine_time = #{installSubmitExamineTime,jdbcType=TIMESTAMP},
</if>
<if test="installApproveTime != null">
install_approve_time = #{installApproveTime,jdbcType=TIMESTAMP},
</if>
<if test="returnVisitTime != null">
return_visit_time = #{returnVisitTime,jdbcType=TIMESTAMP},
</if>
<if test="closeTime != null">
close_time = #{closeTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="itemModel != null">
item_model = #{itemModel,jdbcType=VARCHAR},
</if>
<if test="surveyWallboxModel != null">
survey_wallbox_model = #{surveyWallboxModel,jdbcType=VARCHAR},
</if>
<if test="surveyItemModel != null">
survey_item_model = #{surveyItemModel,jdbcType=VARCHAR},
</if>
<if test="installWallboxModel != null">
install_wallbox_model = #{installWallboxModel,jdbcType=VARCHAR},
</if>
<if test="installItemModel != null">
install_item_model = #{installItemModel,jdbcType=VARCHAR},
</if>
<if test="surveyFollowTime != null">
survey_follow_time = #{surveyFollowTime,jdbcType=TIMESTAMP},
</if>
<if test="installFollowTime != null">
install_follow_time = #{installFollowTime,jdbcType=TIMESTAMP},
</if>
<if test="addressLat != null">
address_lat = #{addressLat,jdbcType=VARCHAR},
</if>
<if test="addressLng != null">
address_lng = #{addressLng,jdbcType=VARCHAR},
</if>
<if test="connectPerson != null">
connect_person = #{connectPerson,jdbcType=VARCHAR},
</if>
<if test="wantHomeTime != null">
want_home_time = #{wantHomeTime,jdbcType=TIMESTAMP},
</if>
<if test="installEmergencyLevel != null">
install_emergency_level = #{installEmergencyLevel,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="isConnect != null">
is_connect = #{isConnect,jdbcType=INTEGER},
</if>
<if test="isNeedSurvey != null">
is_need_survey = #{isNeedSurvey,jdbcType=INTEGER},
</if>
<if test="shipno != null">
shipno = #{shipno,jdbcType=VARCHAR},
</if>
<if test="knowAfterSalesChannel != null">
know_after_sales_channel = #{knowAfterSalesChannel,jdbcType=INTEGER},
</if>
<if test="installLength != null">
install_length = #{installLength,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.Order">
update t_order
set oem_id = #{oemId,jdbcType=INTEGER},
oem_agent_id = #{oemAgentId,jdbcType=INTEGER},
oem_agent_contact_name = #{oemAgentContactName,jdbcType=VARCHAR},
oem_agent_info = #{oemAgentInfo,jdbcType=VARCHAR},
oem_agent_contact_phone = #{oemAgentContactPhone,jdbcType=VARCHAR},
out_order_id = #{outOrderId,jdbcType=VARCHAR},
contract_id = #{contractId,jdbcType=INTEGER},
supplier_contract_id = #{supplierContractId,jdbcType=INTEGER},
user_name = #{userName,jdbcType=VARCHAR},
user_phone = #{userPhone,jdbcType=VARCHAR},
user_sex = #{userSex,jdbcType=INTEGER},
contact_name = #{contactName,jdbcType=VARCHAR},
contact_phone = #{contactPhone,jdbcType=VARCHAR},
region_id = #{regionId,jdbcType=VARCHAR},
warehouse_id = #{warehouseId,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
vehicle_model = #{vehicleModel,jdbcType=VARCHAR},
vehicle_chassis_no = #{vehicleChassisNo,jdbcType=VARCHAR},
vehicle_vin = #{vehicleVin,jdbcType=VARCHAR},
vehicle_parking_no = #{vehicleParkingNo,jdbcType=VARCHAR},
vehicle_parking_status = #{vehicleParkingStatus,jdbcType=VARCHAR},
survey_before_sale_enable = #{surveyBeforeSaleEnable,jdbcType=INTEGER},
manu_dispatch_enable = #{manuDispatchEnable,jdbcType=INTEGER},
wallbox_model = #{wallboxModel,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
expand_status = #{expandStatus,jdbcType=INTEGER},
expand_fail_reason = #{expandFailReason,jdbcType=VARCHAR},
expand_fail_operate = #{expandFailOperate,jdbcType=INTEGER},
expand_remark = #{expandRemark,jdbcType=VARCHAR},
survey_staff_id = #{surveyStaffId,jdbcType=INTEGER},
survey_finish_time = #{surveyFinishTime,jdbcType=TIMESTAMP},
survey_reserve_time = #{surveyReserveTime,jdbcType=TIMESTAMP},
survey_client_name = #{surveyClientName,jdbcType=VARCHAR},
survey_client_phone = #{surveyClientPhone,jdbcType=VARCHAR},
survey_cams_phone = #{surveyCamsPhone,jdbcType=VARCHAR},
survey_reserve_remark = #{surveyReserveRemark,jdbcType=VARCHAR},
install_supplier_id = #{installSupplierId,jdbcType=INTEGER},
install_staff_id = #{installStaffId,jdbcType=INTEGER},
install_finish_time = #{installFinishTime,jdbcType=TIMESTAMP},
install_reserve_time = #{installReserveTime,jdbcType=TIMESTAMP},
install_client_name = #{installClientName,jdbcType=VARCHAR},
install_client_phone = #{installClientPhone,jdbcType=VARCHAR},
install_cams_phone = #{installCamsPhone,jdbcType=VARCHAR},
install_reserve_remark = #{installReserveRemark,jdbcType=VARCHAR},
survey_finish_fail_reason = #{surveyFinishFailReason,jdbcType=VARCHAR},
survey_rectify_fail_reason = #{surveyRectifyFailReason,jdbcType=VARCHAR},
install_change_fail_reason = #{installChangeFailReason,jdbcType=VARCHAR},
install_finish_fail_reason = #{installFinishFailReason,jdbcType=VARCHAR},
install_rectify_fail_reason = #{installRectifyFailReason,jdbcType=VARCHAR},
close_order_reason = #{closeOrderReason,jdbcType=VARCHAR},
install_change_attachment_files = #{installChangeAttachmentFiles,jdbcType=VARCHAR},
survey_reserve_fail_info = #{surveyReserveFailInfo,jdbcType=VARCHAR},
install_reserve_fail_info = #{installReserveFailInfo,jdbcType=VARCHAR},
files = #{files,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
score = #{score,jdbcType=DECIMAL},
visit_content = #{visitContent,jdbcType=VARCHAR},
invoice_time = #{invoiceTime,jdbcType=TIMESTAMP},
estate_type = #{estateType,jdbcType=INTEGER},
has_independent_parking = #{hasIndependentParking,jdbcType=INTEGER},
install_position = #{installPosition,jdbcType=INTEGER},
property_agree = #{propertyAgree,jdbcType=INTEGER},
electric_expand = #{electricExpand,jdbcType=INTEGER},
need_erect_pile = #{needErectPile,jdbcType=INTEGER},
dispatch_time = #{dispatchTime,jdbcType=TIMESTAMP},
survey_submit_examine_time = #{surveySubmitExamineTime,jdbcType=TIMESTAMP},
survey_approve_time = #{surveyApproveTime,jdbcType=TIMESTAMP},
install_submit_examine_time = #{installSubmitExamineTime,jdbcType=TIMESTAMP},
install_approve_time = #{installApproveTime,jdbcType=TIMESTAMP},
return_visit_time = #{returnVisitTime,jdbcType=TIMESTAMP},
close_time = #{closeTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
item_model = #{itemModel,jdbcType=VARCHAR},
survey_wallbox_model = #{surveyWallboxModel,jdbcType=VARCHAR},
survey_item_model = #{surveyItemModel,jdbcType=VARCHAR},
install_wallbox_model = #{installWallboxModel,jdbcType=VARCHAR},
install_item_model = #{installItemModel,jdbcType=VARCHAR},
survey_follow_time = #{surveyFollowTime,jdbcType=TIMESTAMP},
install_follow_time = #{installFollowTime,jdbcType=TIMESTAMP},
address_lat = #{addressLat,jdbcType=VARCHAR},
address_lng = #{addressLng,jdbcType=VARCHAR},
want_home_time = #{wantHomeTime,jdbcType=TIMESTAMP},
install_emergency_level = #{installEmergencyLevel,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
is_connect = #{isConnect,jdbcType=INTEGER},
is_need_survey = #{isNeedSurvey,jdbcType=INTEGER},
shipno = #{record.shipno,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="clearInstallStaff" parameterType="java.lang.String">
update t_order
set install_staff_id = null
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="clearSurveyFollowTime" parameterType="java.lang.String">
update t_order
set survey_follow_time = null
where id = #{orderId,jdbcType=VARCHAR}
</update>
<update id="clearInstallFollowTime" parameterType="java.lang.String">
update t_order
set install_follow_time = null
where id = #{orderId,jdbcType=VARCHAR}
</update>
<select id="selectById" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_order
where id = #{id,jdbcType=VARCHAR}
</select>
<select id="selectDetailById" parameterType="java.lang.String"
resultType="com.boco.nbd.wios.manage.entity.bo.OrderVo">
select
<include refid="Order_Column_List"/>,
oem.name as oemName,
oem.code as oemCode,
oem.organization_code as oemOrgCode,
oem2.name as oemAgentName,
oem2.code as oemAgentCode,
oem2.organization_code as oemAgentOrgCode,
sup.name as supplierName,
staff.name as surveyStaffName,
staff.phone as surveyStaffPhone,
staff2.name as installStaffName,
staff2.phone as installStaffPhone,
case
when region_level = 1 then country_name
when region_level = 2 then area_name
when region_level = 3 then province_name
when region_level = 5 then city_name
else region_name
end as regionName,
sp.secret_no as virtualUserPhone
from t_order t
left join t_oem oem on oem.id = t.oem_id
left join t_oem oem2 on oem2.id = t.oem_agent_id
left join t_supplier sup on sup.id = t.install_supplier_id
left join t_supplier_staff staff on staff.id = t.survey_staff_id
left join t_supplier_staff staff2 on staff2.id = t.install_staff_id
left join t_secret_phone sp on sp.phone = t.user_phone and sp.status = 1
where t.id = #{id}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderBo"
resultType="com.boco.nbd.wios.manage.entity.bo.OrderVo">
select
<include refid="Order_Column_List"/>,
reg.name as regionName,si.overtime_flag as overtimeFlag
<if test="fromExport != null and fromExport == 1">
,oi.wallbox_no as wallboxNo
,oi.real_cable_meter as realCableMeter
,oi.predict_total_fee as predictTotalFee
,os.latitude
,os.longitude
,oi.wallbox_item_id as wallboxItemId
</if>
from t_order t
left join t_region reg on reg.id=t.region_id
<if test="fromExport != null and fromExport == 1">
left join t_order_install oi on oi.order_id=t.id
left join t_order_survey os on os.order_id=t.id
</if>
left join (SELECT a.* FROM (select * FROM t_system_info where account_id = 0 order by id desc) a GROUP BY
a.third_party_id) si on si.third_party_id = t.id and si.order_status = t.status and si.overtime_flag > 0
<where>
<if test="id != null and id != ''">
and t.id = #{id}
</if>
<if test="outOrderId != null and outOrderId != ''">
and t.out_order_id = #{outOrderId}
</if>
<if test="oemId != null and oemId != ''">
and t.oem_id = #{oemId}
</if>
<if test="oemAgentId != null and oemAgentId != ''">
and t.oem_agent_id = #{oemAgentId}
</if>
<if test="userName != null and userName != ''">
<bind name="userNameLike" value="'%' + userName + '%'"/>
and t.user_name like #{userNameLike}
</if>
<if test="userPhone != null and userPhone != ''">
and t.user_phone = #{userPhone}
</if>
<if test="status != null">
and t.status = #{status}
</if>
<if test="installStaffId != null">
and t.install_staff_id = #{installStaffId}
</if>
<if test="installSupplierId != null">
and t.install_supplier_id = #{installSupplierId}
</if>
<if test="type != null">
and t.type = #{type}
</if>
<if test="overtimeType != null">
and si.overtime_flag = #{overtimeType}
</if>
<if test="regionIdList != null">
and t.region_id in
<foreach collection="regionIdList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="createStartTime != null and createStartTime != ''">
and t.create_time &gt;= #{createStartTime}
</if>
<if test="createEndTime != null and createEndTime != ''">
and t.create_time &lt;= #{createEndTime}
</if>
<if test="surveyFinishStartTime != null and surveyFinishStartTime != ''">
and t.survey_finish_time &gt;= #{surveyFinishStartTime}
</if>
<if test="surveyFinishEndTime != null and surveyFinishEndTime != ''">
and t.survey_finish_time &lt;= #{surveyFinishEndTime}
</if>
<if test="installFinishStartTime != null and installFinishStartTime != ''">
and t.install_finish_time &gt;= #{installFinishStartTime}
</if>
<if test="installFinishEndTime != null and installFinishEndTime != ''">
and t.install_finish_time &lt;= #{installFinishEndTime}
</if>
<if test="oemIdList != null">
and t.oem_id in
<foreach collection="oemIdList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="filterOemIds != null">
and t.oem_id in
<foreach collection="filterOemIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="filterSupplierIds != null">
and t.install_supplier_id in
<foreach collection="filterSupplierIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="statusInList != null">
and t.status in
<foreach collection="statusInList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="idInList != null">
and t.id in
<foreach collection="idInList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="scoreGt != null">
and t.score &gt; #{scoreGt}
</if>
<if test="scoreLt != null">
and t.score &lt;= #{scoreLt}
</if>
<if test="expandStatusInt != null and expandStatusInt == 0">
and t.expand_status is null
</if>
<if test="oemAgentInfo != null and oemAgentInfo != ''">
<bind name="oemAgentInfoLike" value="'%' + oemAgentInfo + '%'"/>
and t.oem_agent_info like #{oemAgentInfoLike}
</if>
<if test="isClosed != null">
and t.status != #{isClosed}
</if>
<if test="fromExport != null and fromExport == 1">
<if test="wallboxNo != null and wallboxNo != ''">
and oi.wallbox_no = #{wallboxNo}
</if>
</if>
</where>
order by t.create_time desc
</select>
<select id="selectAll" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderBo"
resultType="com.boco.nbd.wios.manage.entity.bo.Order">
select t.*
from t_order t
<where>
<if test="id != null">
and t.id = #{id}
</if>
<if test="regionId != null">
and t.region_id = #{regionId}
</if>
<if test="regionIdTree != null">
and t.region_id like '${regionIdTree}%'
</if>
<if test="installSupplierId != null">
and t.install_supplier_id = #{installSupplierId}
</if>
<if test="status != null">
and t.status = #{status}
</if>
<if test="createStartTime != null and createStartTime != ''">
and t.create_time &gt;= #{createStartTime}
</if>
<if test="createEndTime != null and createEndTime != ''">
and t.create_time &lt;= #{createEndTime}
</if>
<if test="statusNotInList != null">
and t.status not in
<foreach collection="statusNotInList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="createStartTime != null and createStartTime != ''">
and t.create_time &gt;= #{createStartTime}
</if>
<if test="createEndTime != null and createEndTime != ''">
and t.create_time &lt;= #{createEndTime}
</if>
<if test="month != null and month != ''">
and date_format(t.install_finish_time,'%Y%m') = #{month}
</if>
<if test="quarterFirstMonth != null and quarterFirstMonth != ''">
and date_format(t.dispatch_time,'%Y%m') &gt;= #{quarterFirstMonth}
</if>
<if test="quarterLastMonth != null and quarterLastMonth != ''">
and date_format(t.dispatch_time,'%Y%m') &lt;= #{quarterLastMonth}
</if>
<if test="outOrderId != null and outOrderId != ''">
and t.out_order_id = #{outOrderId}
</if>
</where>
order by t.create_time desc
</select>
<select id="selectWarrantyOrders" resultType="com.boco.nbd.wios.manage.entity.bo.WarrantyOrder">
select tt.* from (
SELECT
t.id AS orderId,
t.user_name AS userName,
t.user_phone AS userPhone,
t.install_finish_time AS startTime,
oi.wallbox_no AS wallboxNo,
DATE_ADD(t.install_finish_time,INTERVAL oc.guarantee_period MONTH) as endTime
FROM
t_order t
LEFT JOIN t_order_install oi ON oi.order_id = t.id
LEFT JOIN t_oem_contract oc ON oc.id = t.contract_id
WHERE
t.install_finish_time IS NOT NULL
AND
t.contract_id IS NOT NULL
and
t.type=1
) as tt
<where>
<if test="expireStartDateStr != null and expireStartDateStr != ''">
and tt.endTime &gt;= #{expireStartDateStr}
</if>
<if test="expireEndDateStr != null and expireEndDateStr != ''">
and tt.endTime &lt;= #{expireEndDateStr}
</if>
<if test="userName != null and userName != ''">
and tt.userName = #{userName}
</if>
<if test="userPhone != null and userPhone != ''">
and tt.userPhone = #{userPhone}
</if>
<if test="orderId != null and orderId != ''">
and tt.orderId = #{orderId}
</if>
<if test="wallboxNo != null and wallboxNo != ''">
and tt.wallboxNo = #{wallboxNo}
</if>
</where>
<if test="orderBy==1">
ORDER BY tt.endTime asc
</if>
<if test="orderBy==2">
ORDER BY tt.endTime desc
</if>
</select>
<select id="selectByCamsPhone" resultType="com.boco.nbd.wios.manage.entity.bo.OrderVo">
select
<include refid="Order_Column_List"/>,
staff.name as installStaffName,
staff.phone as installStaffPhone,
oi.predict_total_fee as installAdditionTotalFee,
oi.expand_fee as expandFee,
(select count(id) > 0
from t_operate_log l
where l.third_party_id = t.id
and l.name = '61') as hasOrderScore
from t_order t
left join t_supplier_staff staff on staff.id = t.install_staff_id
left join t_order_install oi on oi.order_id = t.id
where t.survey_client_phone = #{camsPhone}
or t.user_phone = #{camsPhone}
order by t.create_time desc
</select>
<!-- modify 2022-11-22
以前的坑,survey_staff_id字段根本就没用,survey_staff_id 也存到了install_staff_id中
staff.name as installStaffName,
staff.phone as installStaffPhone,
left join t_supplier_staff staff on staff.id = t.install_staff_id
-->
<select id="selectByCamsPhoneForApp" resultType="com.boco.nbd.wios.manage.entity.bo.OrderVo">
select
<include refid="Order_Column_List"/>,
oi.predict_total_fee as installAdditionTotalFee,
oi.expand_fee as expandFee,
upb.id as billId,
upb.status as billStatus,
upb.amount as billFee,
case when t.status = 64 then 4 when t.status = 61 then 3
when t.status = 52 then 2 else 1
end as appSort
from t_order t
left join t_order_install oi on oi.order_id = t.id
left join t_user_pay_bill upb on upb.ref_id = t.id
where t.status != 64 and (t.survey_cams_phone = #{camsPhone}
or t.user_phone = #{camsPhone}
or t.install_cams_phone = #{camsPhone})
order by t.modify_time desc
</select>
<select id="countByCamsPhone" resultType="java.lang.Integer">
select count(t.id)
from t_order t
where t.survey_client_phone = #{camsPhone}
or t.user_phone = #{camsPhone}
</select>
<select id="selectOwnOrder" resultType="com.boco.nbd.wios.manage.entity.bo.OrderVo">
select
<include refid="Order_Column_List"/>,
oem.name as oemName,
oem2.name as oemAgentName,
sup.name as supplierName,
sup.level as supplierLevel,
max(staff.name) as surveyStaffName,
max(staff.phone) as surveyStaffPhone,
max(staff2.name) as installStaffName,
max(staff2.phone) as installStaffPhone,
sp.secret_no as virtualUserPhone,
oi.wallbox_no as wallboxNo
from t_order t
left join t_oem oem on oem.id=t.oem_id
left join t_oem oem2 on oem2.id=t.oem_agent_id
left join t_supplier sup on sup.id=t.install_supplier_id
left join (select id,name,phone from t_supplier_staff union all select id,name,phone from wb_account) staff on
staff.id=t.survey_staff_id
left join (select id,name,phone from t_supplier_staff union all select id,name,phone from wb_account) staff2 on
staff2.id=t.install_staff_id
left join t_secret_phone sp on sp.phone=t.user_phone and sp.status=1
left join t_order_install oi on oi.order_id=t.id
<where>
<if test="id != null and id !='' ">
and t.id = #{id}
</if>
<if test="type != null">
and t.type = #{type}
</if>
<if test="regionId != null and regionId != null">
and t.region_id in
<foreach collection="regionId.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="installSupplierId != null">
and t.install_supplier_id = #{installSupplierId}
</if>
<if test="staffId != null">
and (t.survey_staff_id = #{staffId} or t.install_staff_id = #{staffId} )
</if>
<if test="status != null">
and t.status = #{status}
</if>
<if test="statusNotInList != null and statusNotInList.size() > 0">
and t.status not in
<foreach collection="statusNotInList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
order by t.create_time desc
</select>
<select id="selectSurveyPeriodOrders" resultType="com.boco.nbd.wios.manage.entity.bo.Order">
select
<include refid="Base_Column_List"/>
from t_order
where survey_follow_time &gt;= #{dateStart}
and survey_follow_time &lt;=#{dateEnd}
and status != 64
</select>
<select id="selectInstallPeriodOrders" resultType="com.boco.nbd.wios.manage.entity.bo.Order">
select
<include refid="Base_Column_List"/>
from t_order
where install_follow_time &gt;= #{dateStart}
and install_follow_time &lt;=#{dateEnd}
and status != 64
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_order (id, oem_id, oem_agent_id, oem_agent_info,
oem_agent_contact_name, oem_agent_contact_phone,
out_order_id, contract_id, supplier_contract_id,
user_name, user_phone, user_sex,
contact_name, contact_phone,region_id,
warehouse_id, address, vehicle_model,
vehicle_chassis_no, vehicle_vin, vehicle_parking_no,
vehicle_parking_status, survey_before_sale_enable,
manu_dispatch_enable, wallbox_model, status,
type, expand_status, expand_fail_reason,
expand_fail_operate, expand_remark, survey_staff_id,
survey_finish_time, survey_reserve_time,
survey_client_name, survey_client_phone, survey_cams_phone,
survey_reserve_remark, install_supplier_id,
install_staff_id, install_finish_time, install_reserve_time,
install_client_name, install_client_phone,
install_cams_phone, install_reserve_remark,
survey_finish_fail_reason, survey_rectify_fail_reason,
install_change_fail_reason, install_finish_fail_reason,
install_rectify_fail_reason, close_order_reason,
install_change_attachment_files, survey_reserve_fail_info,
install_reserve_fail_info, files, description,
score, visit_content, invoice_time,
estate_type, has_independent_parking, install_position,
property_agree, electric_expand, need_erect_pile,
dispatch_time, survey_submit_examine_time,
survey_approve_time, install_submit_examine_time,
install_approve_time, return_visit_time,
close_time, create_account, create_time,
modify_account, modify_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=VARCHAR}, #{item.oemId,jdbcType=INTEGER}, #{item.oemAgentId,jdbcType=INTEGER},
#{item.oemAgentInfo,jdbcType=VARCHAR},
#{item.oemAgentContactName,jdbcType=VARCHAR}, #{item.oemAgentContactPhone,jdbcType=VARCHAR},
#{item.outOrderId,jdbcType=VARCHAR}, #{item.contractId,jdbcType=INTEGER},
#{item.supplierContractId,jdbcType=INTEGER},
#{item.userName,jdbcType=VARCHAR}, #{item.userPhone,jdbcType=VARCHAR}, #{item.userSex,jdbcType=INTEGER},
#{item.contactName,jdbcType=VARCHAR}, #{item.contactPhone,jdbcType=VARCHAR},
#{item.regionId,jdbcType=VARCHAR},
#{item.warehouseId,jdbcType=VARCHAR}, #{item.address,jdbcType=VARCHAR},
#{item.vehicleModel,jdbcType=VARCHAR},
#{item.vehicleChassisNo,jdbcType=VARCHAR}, #{item.vehicleVin,jdbcType=VARCHAR},
#{item.vehicleParkingNo,jdbcType=VARCHAR},
#{item.vehicleParkingStatus,jdbcType=VARCHAR}, #{item.surveyBeforeSaleEnable,jdbcType=INTEGER},
#{item.manuDispatchEnable,jdbcType=INTEGER}, #{item.wallboxModel,jdbcType=VARCHAR},
#{item.status,jdbcType=INTEGER},
#{item.type,jdbcType=INTEGER}, #{item.expandStatus,jdbcType=INTEGER},
#{item.expandFailReason,jdbcType=VARCHAR},
#{item.expandFailOperate,jdbcType=INTEGER}, #{item.expandRemark,jdbcType=VARCHAR},
#{item.surveyStaffId,jdbcType=INTEGER},
#{item.surveyFinishTime,jdbcType=TIMESTAMP}, #{item.surveyReserveTime,jdbcType=TIMESTAMP},
#{item.surveyClientName,jdbcType=VARCHAR}, #{item.surveyClientPhone,jdbcType=VARCHAR},
#{item.surveyCamsPhone,jdbcType=VARCHAR},
#{item.surveyReserveRemark,jdbcType=VARCHAR}, #{item.installSupplierId,jdbcType=INTEGER},
#{item.installStaffId,jdbcType=INTEGER}, #{item.installFinishTime,jdbcType=TIMESTAMP},
#{item.installReserveTime,jdbcType=TIMESTAMP},
#{item.installClientName,jdbcType=VARCHAR}, #{item.installClientPhone,jdbcType=VARCHAR},
#{item.installCamsPhone,jdbcType=VARCHAR}, #{item.installReserveRemark,jdbcType=VARCHAR},
#{item.surveyFinishFailReason,jdbcType=VARCHAR}, #{item.surveyRectifyFailReason,jdbcType=VARCHAR},
#{item.installChangeFailReason,jdbcType=VARCHAR}, #{item.installFinishFailReason,jdbcType=VARCHAR},
#{item.installRectifyFailReason,jdbcType=VARCHAR}, #{item.closeOrderReason,jdbcType=VARCHAR},
#{item.installChangeAttachmentFiles,jdbcType=VARCHAR}, #{item.surveyReserveFailInfo,jdbcType=VARCHAR},
#{item.installReserveFailInfo,jdbcType=VARCHAR}, #{item.files,jdbcType=VARCHAR},
#{item.description,jdbcType=VARCHAR},
#{item.score,jdbcType=DECIMAL}, #{item.visitContent,jdbcType=VARCHAR},
#{item.invoiceTime,jdbcType=TIMESTAMP},
#{item.estateType,jdbcType=INTEGER}, #{item.hasIndependentParking,jdbcType=INTEGER},
#{item.installPosition,jdbcType=INTEGER},
#{item.propertyAgree,jdbcType=INTEGER}, #{item.electricExpand,jdbcType=INTEGER},
#{item.needErectPile,jdbcType=INTEGER},
#{item.dispatchTime,jdbcType=TIMESTAMP}, #{item.surveySubmitExamineTime,jdbcType=TIMESTAMP},
#{item.surveyApproveTime,jdbcType=TIMESTAMP}, #{item.installSubmitExamineTime,jdbcType=TIMESTAMP},
#{item.installApproveTime,jdbcType=TIMESTAMP}, #{item.returnVisitTime,jdbcType=TIMESTAMP},
#{item.closeTime,jdbcType=TIMESTAMP}, #{item.createAccount,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP},
#{item.modifyAccount,jdbcType=VARCHAR}, #{item.modifyTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
<update id="updateInstallWallboxItem" parameterType="java.lang.String">
update
t_order
SET t_order.install_wallbox_model=
IF
(t_order.install_wallbox_model IS NULL OR LENGTH(t_order.install_wallbox_model) = 0,
t_order.install_wallbox_model, #{type})
WHERE id = #{oemId}
</update>
<resultMap id="ContractEnumResultMap" type="com.boco.nbd.wios.manage.enums.ContractIdInfo">
<result column="id" jdbcType="INTEGER" property="id"/>
<result column="code" jdbcType="INTEGER" property="code"/>
</resultMap>
<select id="selectContractEnum" resultMap="ContractEnumResultMap">
SELECT id,
`code`
FROM t_oem_contract
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.OrderScoreMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OrderScore">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_id" jdbcType="INTEGER" property="orderId" />
<result column="score_config_id" jdbcType="INTEGER" property="scoreConfigId" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="weight" jdbcType="INTEGER" property="weight" />
<result column="score" jdbcType="INTEGER" property="score" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, order_id, score_config_id, code, name, status, weight, score, description, create_account,
create_time, modify_account, modify_time
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderScore">
insert into t_order_score (id, order_id, score_config_id,
code, name, weight,
score, type, status,
description, create_account, create_time,
modify_account, modify_time)
values (#{id,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR}, #{scoreConfigId,jdbcType=VARCHAR},
#{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{weight,jdbcType=INTEGER},
#{score,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{status,jdbcType=INTEGER},
#{description,jdbcType=VARCHAR}, #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP})
</insert>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderScore">
update t_order_score
<set>
<if test="score != null">
score = #{score,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByCode" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderScore">
update t_order_score
<set>
<if test="score != null">
score = #{score,jdbcType=INTEGER},
</if>
<if test="resultCalc != null">
score_calc = #{resultCalc,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where order_id = #{orderScoreId,jdbcType=INTEGER}
and code = #{code,jdbcType=VARCHAR},
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_order_score
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getScoreByOrderId" parameterType="java.lang.String" resultType="java.lang.Double">
select
avg(score) as sumScore
from t_order_score
where order_id = #{orderId,jdbcType=INTEGER} and status =1
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderScore" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_order_score
where order_id = #{orderId,jdbcType=INTEGER}
and code = #{code,jdbcType=VARCHAR},
</select>
<select id="getListByOrderId" resultType="com.boco.nbd.wios.manage.entity.bo.OrderScore">
select
<include refid="Base_Column_List" />
from t_order_score
where order_id = #{orderId,jdbcType=VARCHAR} and status =1
</select>
<select id="getOrderListLessThan60" resultType="com.boco.nbd.wios.manage.entity.bo.Order">
select od.*
from t_order od
join t_operate_log ol on od.id = ol.third_party_id
where
od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and od.region_id = #{regionId,jdbcType=INTEGER}
and ol.name = '61'
and DATE_FORMAT(ol.create_time,'%Y-%m') = #{month,jdbcType=VARCHAR}
GROUP BY od.id
</select>
<insert id="insertOrderScore" parameterType="java.lang.String">
insert into t_order_score(order_id, score_config_id, code, name, weight, score, type, status, description,
create_account, create_time, modify_account, modify_time)
SELECT #{orderId,jdbcType=VARCHAR},sc.id, sc.code, sc.name,
sc.weight,0, 1,1, '',
1,NOW(), 1, NOW()
from t_score_config sc
where sc.status=1 and sc.parent_code='customer'
</insert>
<select id="selectByTypeAndOrderIds"
resultType="com.boco.nbd.wios.manage.entity.bo.OrderScore">
select t.*
from t_order_score t
where
t.type=#{type} and
t.order_id in
<foreach collection="orderIds" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.OrderSurveyDeleteMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OrderSurveyDelete" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="order_id" property="orderId" jdbcType="VARCHAR" />
<result column="house_type" property="houseType" jdbcType="INTEGER" />
<result column="parking_type" property="parkingType" jdbcType="INTEGER" />
<result column="parking_info" property="parkingInfo" jdbcType="VARCHAR" />
<result column="parking_condition" property="parkingCondition" jdbcType="INTEGER" />
<result column="install_type" property="installType" jdbcType="INTEGER" />
<result column="type" property="type" jdbcType="BIT" />
<result column="property_company" property="propertyCompany" jdbcType="VARCHAR" />
<result column="property_contact" property="propertyContact" jdbcType="VARCHAR" />
<result column="property_phone" property="propertyPhone" jdbcType="VARCHAR" />
<result column="property_agree" property="propertyAgree" jdbcType="INTEGER" />
<result column="property_reason" property="propertyReason" jdbcType="VARCHAR" />
<result column="power_type" property="powerType" jdbcType="VARCHAR" />
<result column="upper_circuit_breaker" property="upperCircuitBreaker" jdbcType="VARCHAR" />
<result column="upper_line" property="upperLine" jdbcType="VARCHAR" />
<result column="allow_power" property="allowPower" jdbcType="VARCHAR" />
<result column="cable_type" property="cableType" jdbcType="VARCHAR" />
<result column="signal_type" property="signalType" jdbcType="INTEGER" />
<result column="signal_intensity" property="signalIntensity" jdbcType="VARCHAR" />
<result column="over_standard" property="overStandard" jdbcType="INTEGER" />
<result column="cable_meter" property="cableMeter" jdbcType="VARCHAR" />
<result column="cable_install_type" property="cableInstallType" jdbcType="INTEGER" />
<result column="prepare_info" property="prepareInfo" jdbcType="VARCHAR" />
<result column="survey_result" property="surveyResult" jdbcType="INTEGER" />
<result column="predict_over_item" property="predictOverItem" jdbcType="VARCHAR" />
<result column="survey_remark" property="surveyRemark" jdbcType="VARCHAR" />
<result column="pictures" property="pictures" jdbcType="VARCHAR" />
<result column="plan_info" property="planInfo" jdbcType="VARCHAR" />
<result column="survey_attachment" property="surveyAttachment" jdbcType="VARCHAR" />
<result column="address" property="address" jdbcType="VARCHAR" />
<result column="latitude" property="latitude" jdbcType="VARCHAR" />
<result column="longitude" property="longitude" jdbcType="VARCHAR" />
<result column="survey_date" property="surveyDate" jdbcType="DATE" />
<result column="contact_name" property="contactName" jdbcType="VARCHAR" />
<result column="contact_phone" property="contactPhone" jdbcType="VARCHAR" />
<result column="parking_position_no" property="parkingPositionNo" jdbcType="VARCHAR" />
<result column="install_position" property="installPosition" jdbcType="BIT" />
<result column="open_air" property="openAir" jdbcType="BIT" />
<result column="transformer_specific_value" property="transformerSpecificValue" jdbcType="VARCHAR" />
<result column="access_circuit_capacity" property="accessCircuitCapacity" jdbcType="VARCHAR" />
<result column="measured_phase_voltage" property="measuredPhaseVoltage" jdbcType="VARCHAR" />
<result column="measured_phase_current" property="measuredPhaseCurrent" jdbcType="VARCHAR" />
<result column="need_erect_pile" property="needErectPile" jdbcType="BIT" />
<result column="need_special_construction" property="needSpecialConstruction" jdbcType="BIT" />
<result column="create_account" property="createAccount" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, order_id, house_type, parking_type, parking_info, parking_condition, install_type,
type, property_company, property_contact, property_phone, property_agree, property_reason,
power_type, upper_circuit_breaker, upper_line, allow_power, cable_type, signal_type,
signal_intensity, over_standard, cable_meter, cable_install_type, prepare_info, survey_result,
predict_over_item, survey_remark, pictures, plan_info, survey_attachment, address,
latitude, longitude, survey_date, contact_name, contact_phone, parking_position_no,
install_position, open_air, transformer_specific_value, access_circuit_capacity,
measured_phase_voltage, measured_phase_current, need_erect_pile, need_special_construction,
create_account, create_time, modify_account, modify_time
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderSurveyDelete" >
insert into t_order_survey_delete (id, order_id, house_type,
parking_type, parking_info, parking_condition,
install_type, type, property_company,
property_contact, property_phone, property_agree,
property_reason, power_type, upper_circuit_breaker,
upper_line, allow_power, cable_type,
signal_type, signal_intensity, over_standard,
cable_meter, cable_install_type, prepare_info,
survey_result, predict_over_item, survey_remark,
pictures, plan_info, survey_attachment,
address, latitude, longitude,
survey_date, contact_name, contact_phone,
parking_position_no, install_position, open_air,
transformer_specific_value, access_circuit_capacity,
measured_phase_voltage, measured_phase_current,
need_erect_pile, need_special_construction, create_account,
create_time, modify_account, modify_time
)
values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=VARCHAR}, #{houseType,jdbcType=INTEGER},
#{parkingType,jdbcType=INTEGER}, #{parkingInfo,jdbcType=VARCHAR}, #{parkingCondition,jdbcType=INTEGER},
#{installType,jdbcType=INTEGER}, #{type,jdbcType=BIT}, #{propertyCompany,jdbcType=VARCHAR},
#{propertyContact,jdbcType=VARCHAR}, #{propertyPhone,jdbcType=VARCHAR}, #{propertyAgree,jdbcType=INTEGER},
#{propertyReason,jdbcType=VARCHAR}, #{powerType,jdbcType=VARCHAR}, #{upperCircuitBreaker,jdbcType=VARCHAR},
#{upperLine,jdbcType=VARCHAR}, #{allowPower,jdbcType=VARCHAR}, #{cableType,jdbcType=VARCHAR},
#{signalType,jdbcType=INTEGER}, #{signalIntensity,jdbcType=VARCHAR}, #{overStandard,jdbcType=INTEGER},
#{cableMeter,jdbcType=VARCHAR}, #{cableInstallType,jdbcType=INTEGER}, #{prepareInfo,jdbcType=VARCHAR},
#{surveyResult,jdbcType=INTEGER}, #{predictOverItem,jdbcType=VARCHAR}, #{surveyRemark,jdbcType=VARCHAR},
#{pictures,jdbcType=VARCHAR}, #{planInfo,jdbcType=VARCHAR}, #{surveyAttachment,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
#{surveyDate,jdbcType=DATE}, #{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR},
#{parkingPositionNo,jdbcType=VARCHAR}, #{installPosition,jdbcType=BIT}, #{openAir,jdbcType=BIT},
#{transformerSpecificValue,jdbcType=VARCHAR}, #{accessCircuitCapacity,jdbcType=VARCHAR},
#{measuredPhaseVoltage,jdbcType=VARCHAR}, #{measuredPhaseCurrent,jdbcType=VARCHAR},
#{needErectPile,jdbcType=BIT}, #{needSpecialConstruction,jdbcType=BIT}, #{createAccount,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderSurveyDelete" >
insert into t_order_survey_delete
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="orderId != null" >
order_id,
</if>
<if test="houseType != null" >
house_type,
</if>
<if test="parkingType != null" >
parking_type,
</if>
<if test="parkingInfo != null" >
parking_info,
</if>
<if test="parkingCondition != null" >
parking_condition,
</if>
<if test="installType != null" >
install_type,
</if>
<if test="type != null" >
type,
</if>
<if test="propertyCompany != null" >
property_company,
</if>
<if test="propertyContact != null" >
property_contact,
</if>
<if test="propertyPhone != null" >
property_phone,
</if>
<if test="propertyAgree != null" >
property_agree,
</if>
<if test="propertyReason != null" >
property_reason,
</if>
<if test="powerType != null" >
power_type,
</if>
<if test="upperCircuitBreaker != null" >
upper_circuit_breaker,
</if>
<if test="upperLine != null" >
upper_line,
</if>
<if test="allowPower != null" >
allow_power,
</if>
<if test="cableType != null" >
cable_type,
</if>
<if test="signalType != null" >
signal_type,
</if>
<if test="signalIntensity != null" >
signal_intensity,
</if>
<if test="overStandard != null" >
over_standard,
</if>
<if test="cableMeter != null" >
cable_meter,
</if>
<if test="cableInstallType != null" >
cable_install_type,
</if>
<if test="prepareInfo != null" >
prepare_info,
</if>
<if test="surveyResult != null" >
survey_result,
</if>
<if test="predictOverItem != null" >
predict_over_item,
</if>
<if test="surveyRemark != null" >
survey_remark,
</if>
<if test="pictures != null" >
pictures,
</if>
<if test="planInfo != null" >
plan_info,
</if>
<if test="surveyAttachment != null" >
survey_attachment,
</if>
<if test="address != null" >
address,
</if>
<if test="latitude != null" >
latitude,
</if>
<if test="longitude != null" >
longitude,
</if>
<if test="surveyDate != null" >
survey_date,
</if>
<if test="contactName != null" >
contact_name,
</if>
<if test="contactPhone != null" >
contact_phone,
</if>
<if test="parkingPositionNo != null" >
parking_position_no,
</if>
<if test="installPosition != null" >
install_position,
</if>
<if test="openAir != null" >
open_air,
</if>
<if test="transformerSpecificValue != null" >
transformer_specific_value,
</if>
<if test="accessCircuitCapacity != null" >
access_circuit_capacity,
</if>
<if test="measuredPhaseVoltage != null" >
measured_phase_voltage,
</if>
<if test="measuredPhaseCurrent != null" >
measured_phase_current,
</if>
<if test="needErectPile != null" >
need_erect_pile,
</if>
<if test="needSpecialConstruction != null" >
need_special_construction,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="modifyAccount != null" >
modify_account,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="orderId != null" >
#{orderId,jdbcType=VARCHAR},
</if>
<if test="houseType != null" >
#{houseType,jdbcType=INTEGER},
</if>
<if test="parkingType != null" >
#{parkingType,jdbcType=INTEGER},
</if>
<if test="parkingInfo != null" >
#{parkingInfo,jdbcType=VARCHAR},
</if>
<if test="parkingCondition != null" >
#{parkingCondition,jdbcType=INTEGER},
</if>
<if test="installType != null" >
#{installType,jdbcType=INTEGER},
</if>
<if test="type != null" >
#{type,jdbcType=BIT},
</if>
<if test="propertyCompany != null" >
#{propertyCompany,jdbcType=VARCHAR},
</if>
<if test="propertyContact != null" >
#{propertyContact,jdbcType=VARCHAR},
</if>
<if test="propertyPhone != null" >
#{propertyPhone,jdbcType=VARCHAR},
</if>
<if test="propertyAgree != null" >
#{propertyAgree,jdbcType=INTEGER},
</if>
<if test="propertyReason != null" >
#{propertyReason,jdbcType=VARCHAR},
</if>
<if test="powerType != null" >
#{powerType,jdbcType=VARCHAR},
</if>
<if test="upperCircuitBreaker != null" >
#{upperCircuitBreaker,jdbcType=VARCHAR},
</if>
<if test="upperLine != null" >
#{upperLine,jdbcType=VARCHAR},
</if>
<if test="allowPower != null" >
#{allowPower,jdbcType=VARCHAR},
</if>
<if test="cableType != null" >
#{cableType,jdbcType=VARCHAR},
</if>
<if test="signalType != null" >
#{signalType,jdbcType=INTEGER},
</if>
<if test="signalIntensity != null" >
#{signalIntensity,jdbcType=VARCHAR},
</if>
<if test="overStandard != null" >
#{overStandard,jdbcType=INTEGER},
</if>
<if test="cableMeter != null" >
#{cableMeter,jdbcType=VARCHAR},
</if>
<if test="cableInstallType != null" >
#{cableInstallType,jdbcType=INTEGER},
</if>
<if test="prepareInfo != null" >
#{prepareInfo,jdbcType=VARCHAR},
</if>
<if test="surveyResult != null" >
#{surveyResult,jdbcType=INTEGER},
</if>
<if test="predictOverItem != null" >
#{predictOverItem,jdbcType=VARCHAR},
</if>
<if test="surveyRemark != null" >
#{surveyRemark,jdbcType=VARCHAR},
</if>
<if test="pictures != null" >
#{pictures,jdbcType=VARCHAR},
</if>
<if test="planInfo != null" >
#{planInfo,jdbcType=VARCHAR},
</if>
<if test="surveyAttachment != null" >
#{surveyAttachment,jdbcType=VARCHAR},
</if>
<if test="address != null" >
#{address,jdbcType=VARCHAR},
</if>
<if test="latitude != null" >
#{latitude,jdbcType=VARCHAR},
</if>
<if test="longitude != null" >
#{longitude,jdbcType=VARCHAR},
</if>
<if test="surveyDate != null" >
#{surveyDate,jdbcType=DATE},
</if>
<if test="contactName != null" >
#{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null" >
#{contactPhone,jdbcType=VARCHAR},
</if>
<if test="parkingPositionNo != null" >
#{parkingPositionNo,jdbcType=VARCHAR},
</if>
<if test="installPosition != null" >
#{installPosition,jdbcType=BIT},
</if>
<if test="openAir != null" >
#{openAir,jdbcType=BIT},
</if>
<if test="transformerSpecificValue != null" >
#{transformerSpecificValue,jdbcType=VARCHAR},
</if>
<if test="accessCircuitCapacity != null" >
#{accessCircuitCapacity,jdbcType=VARCHAR},
</if>
<if test="measuredPhaseVoltage != null" >
#{measuredPhaseVoltage,jdbcType=VARCHAR},
</if>
<if test="measuredPhaseCurrent != null" >
#{measuredPhaseCurrent,jdbcType=VARCHAR},
</if>
<if test="needErectPile != null" >
#{needErectPile,jdbcType=BIT},
</if>
<if test="needSpecialConstruction != null" >
#{needSpecialConstruction,jdbcType=BIT},
</if>
<if test="createAccount != null" >
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null" >
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_order_survey_delete ( order_id, house_type,
parking_type, parking_info, parking_condition,
install_type, type, property_company,
property_contact, property_phone, property_agree,
property_reason, power_type, upper_circuit_breaker,
upper_line, allow_power, cable_type,
signal_type, signal_intensity, over_standard,
cable_meter, cable_install_type, prepare_info,
survey_result, predict_over_item, survey_remark,
pictures, plan_info, survey_attachment,
address, latitude, longitude,
survey_date, contact_name, contact_phone,
parking_position_no, install_position, open_air,
transformer_specific_value, access_circuit_capacity,
measured_phase_voltage, measured_phase_current,
need_erect_pile, need_special_construction, create_account,
create_time, modify_account, modify_time
)
values
<foreach collection="list" item="item" separator=",">
( #{item.orderId,jdbcType=VARCHAR}, #{item.houseType,jdbcType=INTEGER},
#{item.parkingType,jdbcType=INTEGER}, #{item.parkingInfo,jdbcType=VARCHAR}, #{item.parkingCondition,jdbcType=INTEGER},
#{item.installType,jdbcType=INTEGER}, #{item.type,jdbcType=BIT}, #{item.propertyCompany,jdbcType=VARCHAR},
#{item.propertyContact,jdbcType=VARCHAR}, #{item.propertyPhone,jdbcType=VARCHAR}, #{item.propertyAgree,jdbcType=INTEGER},
#{item.propertyReason,jdbcType=VARCHAR}, #{item.powerType,jdbcType=VARCHAR}, #{item.upperCircuitBreaker,jdbcType=VARCHAR},
#{item.upperLine,jdbcType=VARCHAR}, #{item.allowPower,jdbcType=VARCHAR}, #{item.cableType,jdbcType=VARCHAR},
#{item.signalType,jdbcType=INTEGER}, #{item.signalIntensity,jdbcType=VARCHAR}, #{item.overStandard,jdbcType=INTEGER},
#{item.cableMeter,jdbcType=VARCHAR}, #{item.cableInstallType,jdbcType=INTEGER}, #{item.prepareInfo,jdbcType=VARCHAR},
#{item.surveyResult,jdbcType=INTEGER}, #{item.predictOverItem,jdbcType=VARCHAR}, #{item.surveyRemark,jdbcType=VARCHAR},
#{item.pictures,jdbcType=VARCHAR}, #{item.planInfo,jdbcType=VARCHAR}, #{item.surveyAttachment,jdbcType=VARCHAR},
#{item.address,jdbcType=VARCHAR}, #{item.latitude,jdbcType=VARCHAR}, #{item.longitude,jdbcType=VARCHAR},
#{item.surveyDate,jdbcType=DATE}, #{item.contactName,jdbcType=VARCHAR}, #{item.contactPhone,jdbcType=VARCHAR},
#{item.parkingPositionNo,jdbcType=VARCHAR}, #{item.installPosition,jdbcType=BIT}, #{item.openAir,jdbcType=BIT},
#{item.transformerSpecificValue,jdbcType=VARCHAR}, #{item.accessCircuitCapacity,jdbcType=VARCHAR},
#{item.measuredPhaseVoltage,jdbcType=VARCHAR}, #{item.measuredPhaseCurrent,jdbcType=VARCHAR},
#{item.needErectPile,jdbcType=BIT}, #{item.needSpecialConstruction,jdbcType=BIT}, #{item.createAccount,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.modifyAccount,jdbcType=VARCHAR}, #{item.modifyTime,jdbcType=TIMESTAMP}
)
</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.boco.nbd.wios.manage.mapper.def.OrderSurveyMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.OrderSurvey">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="house_type" jdbcType="INTEGER" property="houseType" />
<result column="parking_type" jdbcType="INTEGER" property="parkingType" />
<result column="parking_info" jdbcType="VARCHAR" property="parkingInfo" />
<result column="parking_condition" jdbcType="INTEGER" property="parkingCondition" />
<result column="install_type" jdbcType="INTEGER" property="installType" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="property_company" jdbcType="VARCHAR" property="propertyCompany" />
<result column="property_contact" jdbcType="VARCHAR" property="propertyContact" />
<result column="property_phone" jdbcType="VARCHAR" property="propertyPhone" />
<result column="property_agree" jdbcType="INTEGER" property="propertyAgree" />
<result column="property_reason" jdbcType="VARCHAR" property="propertyReason" />
<result column="power_type" jdbcType="VARCHAR" property="powerType" />
<result column="upper_circuit_breaker" jdbcType="VARCHAR" property="upperCircuitBreaker" />
<result column="upper_line" jdbcType="VARCHAR" property="upperLine" />
<result column="allow_power" jdbcType="VARCHAR" property="allowPower" />
<result column="cable_type" jdbcType="VARCHAR" property="cableType" />
<result column="signal_type" jdbcType="INTEGER" property="signalType" />
<result column="signal_intensity" jdbcType="VARCHAR" property="signalIntensity" />
<result column="over_standard" jdbcType="INTEGER" property="overStandard" />
<result column="cable_meter" jdbcType="VARCHAR" property="cableMeter" />
<result column="cable_install_type" jdbcType="INTEGER" property="cableInstallType" />
<result column="prepare_info" jdbcType="VARCHAR" property="prepareInfo" />
<result column="survey_result" jdbcType="INTEGER" property="surveyResult" />
<result column="predict_over_item" jdbcType="VARCHAR" property="predictOverItem" />
<result column="survey_remark" jdbcType="VARCHAR" property="surveyRemark" />
<result column="pictures" jdbcType="VARCHAR" property="pictures" />
<result column="plan_info" jdbcType="VARCHAR" property="planInfo" />
<result column="survey_attachment" jdbcType="VARCHAR" property="surveyAttachment" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="latitude" jdbcType="VARCHAR" property="latitude" />
<result column="longitude" jdbcType="VARCHAR" property="longitude" />
<result column="survey_date" jdbcType="DATE" property="surveyDate" />
<result column="contact_name" jdbcType="VARCHAR" property="contactName" />
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone" />
<result column="parking_position_no" jdbcType="VARCHAR" property="parkingPositionNo" />
<result column="install_position" jdbcType="INTEGER" property="installPosition" />
<result column="open_air" jdbcType="INTEGER" property="openAir" />
<result column="transformer_specific_value" jdbcType="VARCHAR" property="transformerSpecificValue" />
<result column="access_circuit_capacity" jdbcType="VARCHAR" property="accessCircuitCapacity" />
<result column="measured_phase_voltage" jdbcType="VARCHAR" property="measuredPhaseVoltage" />
<result column="measured_phase_current" jdbcType="VARCHAR" property="measuredPhaseCurrent" />
<result column="need_erect_pile" jdbcType="INTEGER" property="needErectPile" />
<result column="need_special_construction" jdbcType="INTEGER" property="needSpecialConstruction" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, order_id, house_type, parking_type, parking_info, parking_condition, install_type,
type, property_company, property_contact, property_phone, property_agree, property_reason,
power_type, upper_circuit_breaker, upper_line, allow_power, cable_type, signal_type,
signal_intensity, over_standard, cable_meter, cable_install_type, prepare_info, survey_result,
predict_over_item, survey_remark, pictures, plan_info, survey_attachment, address,
latitude, longitude, survey_date, contact_name, contact_phone, parking_position_no,
install_position, open_air, transformer_specific_value, access_circuit_capacity,
measured_phase_voltage, measured_phase_current, need_erect_pile, need_special_construction,
create_account, create_time, modify_account, modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_order_survey
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderSurvey"
useGeneratedKeys="true" keyProperty="id">
insert into t_order_survey (id, order_id, house_type,
parking_type, parking_info, parking_condition,
install_type, type, property_company,
property_contact, property_phone, property_agree,
property_reason, power_type, upper_circuit_breaker,
upper_line, allow_power, cable_type,
signal_type, signal_intensity, over_standard,
cable_meter, cable_install_type, prepare_info,
survey_result, predict_over_item, survey_remark,
pictures, plan_info, survey_attachment,
address, latitude, longitude,
survey_date, contact_name, contact_phone,
parking_position_no, install_position, open_air,
transformer_specific_value, access_circuit_capacity,
measured_phase_voltage, measured_phase_current,
need_erect_pile, need_special_construction,
create_account, create_time, modify_account,
modify_time)
values (#{id,jdbcType=INTEGER}, #{orderId,jdbcType=VARCHAR}, #{houseType,jdbcType=INTEGER},
#{parkingType,jdbcType=INTEGER}, #{parkingInfo,jdbcType=VARCHAR}, #{parkingCondition,jdbcType=INTEGER},
#{installType,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{propertyCompany,jdbcType=VARCHAR},
#{propertyContact,jdbcType=VARCHAR}, #{propertyPhone,jdbcType=VARCHAR}, #{propertyAgree,jdbcType=INTEGER},
#{propertyReason,jdbcType=VARCHAR}, #{powerType,jdbcType=VARCHAR}, #{upperCircuitBreaker,jdbcType=VARCHAR},
#{upperLine,jdbcType=VARCHAR}, #{allowPower,jdbcType=VARCHAR}, #{cableType,jdbcType=VARCHAR},
#{signalType,jdbcType=INTEGER}, #{signalIntensity,jdbcType=VARCHAR}, #{overStandard,jdbcType=INTEGER},
#{cableMeter,jdbcType=VARCHAR}, #{cableInstallType,jdbcType=INTEGER}, #{prepareInfo,jdbcType=VARCHAR},
#{surveyResult,jdbcType=INTEGER}, #{predictOverItem,jdbcType=VARCHAR}, #{surveyRemark,jdbcType=VARCHAR},
#{pictures,jdbcType=VARCHAR}, #{planInfo,jdbcType=VARCHAR}, #{surveyAttachment,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, #{longitude,jdbcType=VARCHAR},
#{surveyDate,jdbcType=DATE}, #{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR},
#{parkingPositionNo,jdbcType=VARCHAR}, #{installPosition,jdbcType=INTEGER}, #{openAir,jdbcType=INTEGER},
#{transformerSpecificValue,jdbcType=VARCHAR}, #{accessCircuitCapacity,jdbcType=VARCHAR},
#{measuredPhaseVoltage,jdbcType=VARCHAR}, #{measuredPhaseCurrent,jdbcType=VARCHAR},
#{needErectPile,jdbcType=INTEGER}, #{needSpecialConstruction,jdbcType=INTEGER},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderSurvey">
insert into t_order_survey
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="houseType != null">
house_type,
</if>
<if test="parkingType != null">
parking_type,
</if>
<if test="parkingInfo != null">
parking_info,
</if>
<if test="parkingCondition != null">
parking_condition,
</if>
<if test="installType != null">
install_type,
</if>
<if test="type != null">
type,
</if>
<if test="propertyCompany != null">
property_company,
</if>
<if test="propertyContact != null">
property_contact,
</if>
<if test="propertyPhone != null">
property_phone,
</if>
<if test="propertyAgree != null">
property_agree,
</if>
<if test="propertyReason != null">
property_reason,
</if>
<if test="powerType != null">
power_type,
</if>
<if test="upperCircuitBreaker != null">
upper_circuit_breaker,
</if>
<if test="upperLine != null">
upper_line,
</if>
<if test="allowPower != null">
allow_power,
</if>
<if test="cableType != null">
cable_type,
</if>
<if test="signalType != null">
signal_type,
</if>
<if test="signalIntensity != null">
signal_intensity,
</if>
<if test="overStandard != null">
over_standard,
</if>
<if test="cableMeter != null">
cable_meter,
</if>
<if test="cableInstallType != null">
cable_install_type,
</if>
<if test="prepareInfo != null">
prepare_info,
</if>
<if test="surveyResult != null">
survey_result,
</if>
<if test="predictOverItem != null">
predict_over_item,
</if>
<if test="surveyRemark != null">
survey_remark,
</if>
<if test="pictures != null">
pictures,
</if>
<if test="planInfo != null">
plan_info,
</if>
<if test="surveyAttachment != null">
survey_attachment,
</if>
<if test="address != null">
address,
</if>
<if test="latitude != null">
latitude,
</if>
<if test="longitude != null">
longitude,
</if>
<if test="surveyDate != null">
survey_date,
</if>
<if test="contactName != null">
contact_name,
</if>
<if test="contactPhone != null">
contact_phone,
</if>
<if test="parkingPositionNo != null">
parking_position_no,
</if>
<if test="installPosition != null">
install_position,
</if>
<if test="openAir != null">
open_air,
</if>
<if test="transformerSpecificValue != null">
transformer_specific_value,
</if>
<if test="accessCircuitCapacity != null">
access_circuit_capacity,
</if>
<if test="measuredPhaseVoltage != null">
measured_phase_voltage,
</if>
<if test="measuredPhaseCurrent != null">
measured_phase_current,
</if>
<if test="needErectPile != null">
need_erect_pile,
</if>
<if test="needSpecialConstruction != null">
need_special_construction,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="houseType != null">
#{houseType,jdbcType=INTEGER},
</if>
<if test="parkingType != null">
#{parkingType,jdbcType=INTEGER},
</if>
<if test="parkingInfo != null">
#{parkingInfo,jdbcType=VARCHAR},
</if>
<if test="parkingCondition != null">
#{parkingCondition,jdbcType=INTEGER},
</if>
<if test="installType != null">
#{installType,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="propertyCompany != null">
#{propertyCompany,jdbcType=VARCHAR},
</if>
<if test="propertyContact != null">
#{propertyContact,jdbcType=VARCHAR},
</if>
<if test="propertyPhone != null">
#{propertyPhone,jdbcType=VARCHAR},
</if>
<if test="propertyAgree != null">
#{propertyAgree,jdbcType=INTEGER},
</if>
<if test="propertyReason != null">
#{propertyReason,jdbcType=VARCHAR},
</if>
<if test="powerType != null">
#{powerType,jdbcType=VARCHAR},
</if>
<if test="upperCircuitBreaker != null">
#{upperCircuitBreaker,jdbcType=VARCHAR},
</if>
<if test="upperLine != null">
#{upperLine,jdbcType=VARCHAR},
</if>
<if test="allowPower != null">
#{allowPower,jdbcType=VARCHAR},
</if>
<if test="cableType != null">
#{cableType,jdbcType=VARCHAR},
</if>
<if test="signalType != null">
#{signalType,jdbcType=INTEGER},
</if>
<if test="signalIntensity != null">
#{signalIntensity,jdbcType=VARCHAR},
</if>
<if test="overStandard != null">
#{overStandard,jdbcType=INTEGER},
</if>
<if test="cableMeter != null">
#{cableMeter,jdbcType=VARCHAR},
</if>
<if test="cableInstallType != null">
#{cableInstallType,jdbcType=INTEGER},
</if>
<if test="prepareInfo != null">
#{prepareInfo,jdbcType=VARCHAR},
</if>
<if test="surveyResult != null">
#{surveyResult,jdbcType=INTEGER},
</if>
<if test="predictOverItem != null">
#{predictOverItem,jdbcType=VARCHAR},
</if>
<if test="surveyRemark != null">
#{surveyRemark,jdbcType=VARCHAR},
</if>
<if test="pictures != null">
#{pictures,jdbcType=VARCHAR},
</if>
<if test="planInfo != null">
#{planInfo,jdbcType=VARCHAR},
</if>
<if test="surveyAttachment != null">
#{surveyAttachment,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
#{latitude,jdbcType=VARCHAR},
</if>
<if test="longitude != null">
#{longitude,jdbcType=VARCHAR},
</if>
<if test="surveyDate != null">
#{surveyDate,jdbcType=DATE},
</if>
<if test="contactName != null">
#{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
#{contactPhone,jdbcType=VARCHAR},
</if>
<if test="parkingPositionNo != null">
#{parkingPositionNo,jdbcType=VARCHAR},
</if>
<if test="installPosition != null">
#{installPosition,jdbcType=INTEGER},
</if>
<if test="openAir != null">
#{openAir,jdbcType=INTEGER},
</if>
<if test="transformerSpecificValue != null">
#{transformerSpecificValue,jdbcType=VARCHAR},
</if>
<if test="accessCircuitCapacity != null">
#{accessCircuitCapacity,jdbcType=VARCHAR},
</if>
<if test="measuredPhaseVoltage != null">
#{measuredPhaseVoltage,jdbcType=VARCHAR},
</if>
<if test="measuredPhaseCurrent != null">
#{measuredPhaseCurrent,jdbcType=VARCHAR},
</if>
<if test="needErectPile != null">
#{needErectPile,jdbcType=INTEGER},
</if>
<if test="needSpecialConstruction != null">
#{needSpecialConstruction,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderSurvey">
update t_order_survey
<set>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="houseType != null">
house_type = #{houseType,jdbcType=INTEGER},
</if>
<if test="parkingType != null">
parking_type = #{parkingType,jdbcType=INTEGER},
</if>
<if test="parkingInfo != null">
parking_info = #{parkingInfo,jdbcType=VARCHAR},
</if>
<if test="parkingCondition != null">
parking_condition = #{parkingCondition,jdbcType=INTEGER},
</if>
<if test="installType != null">
install_type = #{installType,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="propertyCompany != null">
property_company = #{propertyCompany,jdbcType=VARCHAR},
</if>
<if test="propertyContact != null">
property_contact = #{propertyContact,jdbcType=VARCHAR},
</if>
<if test="propertyPhone != null">
property_phone = #{propertyPhone,jdbcType=VARCHAR},
</if>
<if test="propertyAgree != null">
property_agree = #{propertyAgree,jdbcType=INTEGER},
</if>
<if test="propertyReason != null">
property_reason = #{propertyReason,jdbcType=VARCHAR},
</if>
<if test="powerType != null">
power_type = #{powerType,jdbcType=VARCHAR},
</if>
<if test="upperCircuitBreaker != null">
upper_circuit_breaker = #{upperCircuitBreaker,jdbcType=VARCHAR},
</if>
<if test="upperLine != null">
upper_line = #{upperLine,jdbcType=VARCHAR},
</if>
<if test="allowPower != null">
allow_power = #{allowPower,jdbcType=VARCHAR},
</if>
<if test="cableType != null">
cable_type = #{cableType,jdbcType=VARCHAR},
</if>
<if test="signalType != null">
signal_type = #{signalType,jdbcType=INTEGER},
</if>
<if test="signalIntensity != null">
signal_intensity = #{signalIntensity,jdbcType=VARCHAR},
</if>
<if test="overStandard != null">
over_standard = #{overStandard,jdbcType=INTEGER},
</if>
<if test="cableMeter != null">
cable_meter = #{cableMeter,jdbcType=VARCHAR},
</if>
<if test="cableInstallType != null">
cable_install_type = #{cableInstallType,jdbcType=INTEGER},
</if>
<if test="prepareInfo != null">
prepare_info = #{prepareInfo,jdbcType=VARCHAR},
</if>
<if test="surveyResult != null">
survey_result = #{surveyResult,jdbcType=INTEGER},
</if>
<if test="predictOverItem != null">
predict_over_item = #{predictOverItem,jdbcType=VARCHAR},
</if>
<if test="surveyRemark != null">
survey_remark = #{surveyRemark,jdbcType=VARCHAR},
</if>
<if test="pictures != null">
pictures = #{pictures,jdbcType=VARCHAR},
</if>
<if test="planInfo != null">
plan_info = #{planInfo,jdbcType=VARCHAR},
</if>
<if test="surveyAttachment != null">
survey_attachment = #{surveyAttachment,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="latitude != null">
latitude = #{latitude,jdbcType=VARCHAR},
</if>
<if test="longitude != null">
longitude = #{longitude,jdbcType=VARCHAR},
</if>
<if test="surveyDate != null">
survey_date = #{surveyDate,jdbcType=DATE},
</if>
<if test="contactName != null">
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
contact_phone = #{contactPhone,jdbcType=VARCHAR},
</if>
<if test="parkingPositionNo != null">
parking_position_no = #{parkingPositionNo,jdbcType=VARCHAR},
</if>
<if test="installPosition != null">
install_position = #{installPosition,jdbcType=INTEGER},
</if>
<if test="openAir != null">
open_air = #{openAir,jdbcType=INTEGER},
</if>
<if test="transformerSpecificValue != null">
transformer_specific_value = #{transformerSpecificValue,jdbcType=VARCHAR},
</if>
<if test="accessCircuitCapacity != null">
access_circuit_capacity = #{accessCircuitCapacity,jdbcType=VARCHAR},
</if>
<if test="measuredPhaseVoltage != null">
measured_phase_voltage = #{measuredPhaseVoltage,jdbcType=VARCHAR},
</if>
<if test="measuredPhaseCurrent != null">
measured_phase_current = #{measuredPhaseCurrent,jdbcType=VARCHAR},
</if>
<if test="needErectPile != null">
need_erect_pile = #{needErectPile,jdbcType=INTEGER},
</if>
<if test="needSpecialConstruction != null">
need_special_construction = #{needSpecialConstruction,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.OrderSurvey">
update t_order_survey
set order_id = #{orderId,jdbcType=VARCHAR},
house_type = #{houseType,jdbcType=INTEGER},
parking_type = #{parkingType,jdbcType=INTEGER},
parking_info = #{parkingInfo,jdbcType=VARCHAR},
parking_condition = #{parkingCondition,jdbcType=INTEGER},
install_type = #{installType,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
property_company = #{propertyCompany,jdbcType=VARCHAR},
property_contact = #{propertyContact,jdbcType=VARCHAR},
property_phone = #{propertyPhone,jdbcType=VARCHAR},
property_agree = #{propertyAgree,jdbcType=INTEGER},
property_reason = #{propertyReason,jdbcType=VARCHAR},
power_type = #{powerType,jdbcType=VARCHAR},
upper_circuit_breaker = #{upperCircuitBreaker,jdbcType=VARCHAR},
upper_line = #{upperLine,jdbcType=VARCHAR},
allow_power = #{allowPower,jdbcType=VARCHAR},
cable_type = #{cableType,jdbcType=VARCHAR},
signal_type = #{signalType,jdbcType=INTEGER},
signal_intensity = #{signalIntensity,jdbcType=VARCHAR},
over_standard = #{overStandard,jdbcType=INTEGER},
cable_meter = #{cableMeter,jdbcType=VARCHAR},
cable_install_type = #{cableInstallType,jdbcType=INTEGER},
prepare_info = #{prepareInfo,jdbcType=VARCHAR},
survey_result = #{surveyResult,jdbcType=INTEGER},
predict_over_item = #{predictOverItem,jdbcType=VARCHAR},
survey_remark = #{surveyRemark,jdbcType=VARCHAR},
pictures = #{pictures,jdbcType=VARCHAR},
plan_info = #{planInfo,jdbcType=VARCHAR},
survey_attachment = #{surveyAttachment,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
latitude = #{latitude,jdbcType=VARCHAR},
longitude = #{longitude,jdbcType=VARCHAR},
survey_date = #{surveyDate,jdbcType=DATE},
contact_name = #{contactName,jdbcType=VARCHAR},
contact_phone = #{contactPhone,jdbcType=VARCHAR},
parking_position_no = #{parkingPositionNo,jdbcType=VARCHAR},
install_position = #{installPosition,jdbcType=INTEGER},
open_air = #{openAir,jdbcType=INTEGER},
transformer_specific_value = #{transformerSpecificValue,jdbcType=VARCHAR},
access_circuit_capacity = #{accessCircuitCapacity,jdbcType=VARCHAR},
measured_phase_voltage = #{measuredPhaseVoltage,jdbcType=VARCHAR},
measured_phase_current = #{measuredPhaseCurrent,jdbcType=VARCHAR},
need_erect_pile = #{needErectPile,jdbcType=INTEGER},
need_special_construction = #{needSpecialConstruction,jdbcType=INTEGER},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_order_survey
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByOrderId" resultMap="BaseResultMap">
select *
from t_order_survey
where order_id = #{orderId} and type = #{type}
</select>
<select id="selectListByOrderId" resultType="com.boco.nbd.wios.manage.entity.bo.OrderSurvey">
select
<include refid="Base_Column_List" />
from t_order_survey
where order_id = #{orderId}
</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.boco.nbd.wios.flow.mapper.def.PlanTaskMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.flow.entity.po.PlanTaskPO">
<result property="year" column="year" jdbcType="VARCHAR"/>
<result property="oemName" column="oem_name" jdbcType="VARCHAR"/>
<result property="janCount" column="jan_count" jdbcType="INTEGER"/>
<result property="febCount" column="feb_count" jdbcType="INTEGER"/>
<result property="marCount" column="mar_count" jdbcType="INTEGER"/>
<result property="aprCount" column="apr_count" jdbcType="INTEGER"/>
<result property="mayCount" column="may_count" jdbcType="INTEGER"/>
<result property="junCount" column="jun_count" jdbcType="INTEGER"/>
<result property="julCount" column="jul_count" jdbcType="INTEGER"/>
<result property="augCount" column="aug_count" jdbcType="INTEGER"/>
<result property="sepCount" column="sep_count" jdbcType="INTEGER"/>
<result property="octCount" column="oct_count" jdbcType="INTEGER"/>
<result property="novCount" column="nov_count" jdbcType="INTEGER"/>
<result property="decCount" column="dec_count" jdbcType="INTEGER"/>
<result property="createUser" column="create_user" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
year,oem_name,jan_count,
feb_count,mar_count,apr_count,
may_count,jun_count,jul_count,
aug_count,sep_count,oct_count,
nov_count,dec_count,create_user
</sql>
<select id="selectByYearAndOemName" resultType="com.boco.nbd.wios.flow.entity.po.PlanTaskPO">
select year,
sum(jan_count) as jan_count,
sum(feb_count) as feb_count,
sum(mar_count) as mar_count,
sum(apr_count) as apr_count,
sum(may_count) as may_count,
sum(jun_count) as jun_count,
sum(jul_count) as jul_count,
sum(aug_count) as aug_count,
sum(sep_count) as sep_count,
sum(oct_count) as oct_count,
sum(nov_count) as nov_count,
sum(dec_count) as dec_count
from t_plan_task
where year=#{year}
<if test="oemName != null and oemName != ''">
and oem_name=#{oemName}
</if>
GROUP BY year
</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.boco.nbd.wios.manage.mapper.def.RegionMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Region">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="code" jdbcType="VARCHAR" property="code"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="parent_id" jdbcType="INTEGER" property="parentId"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="id_tree" jdbcType="VARCHAR" property="idTree"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
</resultMap>
<sql id="Base_Column_List">
id
, code, name, parent_id, status, remark,id_tree, create_time, update_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete
from t_region
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Region"
useGeneratedKeys="true" keyProperty="id">
insert into t_region (id, code, name,
parent_id, status, remark, id_tree,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{parentId,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR},
#{idTree,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Region">
insert into t_region
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="name != null">
name,
</if>
<if test="parentId != null">
parent_id,
</if>
<if test="status != null">
status,
</if>
<if test="remark != null">
remark,
</if>
<if test="idTree != null">
id_tree,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
#{parentId,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="idTree != null">
#{idTree,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Region">
update t_region
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="parentId != null">
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="idTree != null">
id_tree = #{idTree,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.Region">
update t_region
set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
id_tree = #{idTree,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_region
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectRegionByOrderId" parameterType="String" resultType="Integer">
SELECT CASE
WHEN
t.region_level = 1 THEN
t.country_id
WHEN t.region_level = 2 THEN
t.area_id
WHEN t.region_level = 3 THEN
t.province_id
WHEN t.region_level = 5 THEN
t.city_id
ELSE t.region_id
END AS region_id
FROM t_order AS t
WHERE t.id = #{orderId}
</select>
<select id="selectByParentId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_region
where parent_id = #{parentId,jdbcType=INTEGER} and status=1
</select>
<select id="selectAll" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_region t
<where>
1=1
<if test="status != null">
and t.status = #{status}
</if>
<if test="ids != null">
and t.id in
<foreach collection="ids" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
order by t.id_tree
</where>
</select>
<select id="selectByName" parameterType="java.lang.String" resultMap="BaseResultMap">
select *
from t_region
where name = #{name}
and status = 1
</select>
<select id="selectByCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select *
from t_region
where code = #{code}
</select>
<select id="selectSelfAndChildren" parameterType="java.lang.String" resultMap="BaseResultMap">
select *
from t_region
where id_tree like concat(#{idTree}, '%')
</select>
<update id="updateIdTree">
update t_region
set id_tree = concat(#{idTreeNewPrefix}, substring(id_tree, length(#{idTreePrefix}) + 1, length(id_tree)))
where id_tree like concat(#{idTreePrefix}, '%')
</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.boco.nbd.wios.manage.mapper.def.ReportMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.ReportOrderDTO">
<result column="supplier_id" jdbcType="INTEGER" property="supplierId" />
<result column="supplier_name" jdbcType="VARCHAR" property="supplierName" />
<result column="region_id" jdbcType="INTEGER" property="regionId" />
<result column="region_name" jdbcType="VARCHAR" property="regionName" />
<result column="count_total" jdbcType="INTEGER" property="countTotal" />
<result column="count_unfinished" jdbcType="INTEGER" property="countUnfinished" />
<result column="count_finished" jdbcType="INTEGER" property="countFinished" />
<result column="count_closed" jdbcType="INTEGER" property="countClosed" />
<result column="avg_install_time" jdbcType="DECIMAL" property="avgInstallTime" />
<result column="finish_ratio" jdbcType="DECIMAL" property="finishRatio" />
</resultMap>
<sql id="reportOrderWhere">
<if test="supplierIds != null">
and od.install_supplier_id in ( ${supplierIds} )
</if>
<if test="regionId != null">
and od.region_id = #{regionId,jdbcType=INTEGER}
</if>
<if test="vehicleModel != null and vehicleModel != ''" >
and od.vehicle_model like CONCAT(CONCAT('%', #{vehicleModel,jdbcType=VARCHAR}),'%')
</if>
<!-- <if test="beginTime != null and beginTime != ''" >
and od.survey_reserve_time <![CDATA[ >= ]]> #{beginTime,jdbcType=VARCHAR}
</if>
<if test="endTime != null and endTime != ''" >
and od.survey_reserve_time <![CDATA[ <= ]]> #{endTime,jdbcType=VARCHAR}
</if> -->
</sql>
<select id="countOrderGroupBySupplierAndRegion" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.ReportOrderBo">
select
od.install_supplier_id as supplier_id, ts.name as supplier_name,
<if test="regionId == null">
od.region_id, tr.name as region_name,
</if>
count(1) as count_total,
sum(case od.status when 64 then 1 else 0 end) as count_closed,
sum(case when od.install_finish_time is null then (case od.status when 64 then 0 else 1 end) else 0 end) as count_unfinished,
sum(case when od.install_finish_time is null then 0 else (case od.status when 64 then 0 else 1 end) end) as count_finished
from t_order od
join t_supplier ts on od.install_supplier_id = ts.id
join t_region tr on od.region_id = tr.id
where 1=1
<if test="beginTime != null and beginTime != ''" >
and od.dispatch_time <![CDATA[ >= ]]> #{beginTime,jdbcType=VARCHAR}
</if>
<if test="endTime != null and endTime != ''" >
and od.dispatch_time <![CDATA[ <= ]]> #{endTime,jdbcType=VARCHAR}
</if>
<if test="supplierIds != null">
and od.install_supplier_id in ( ${supplierIds} )
</if>
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and tr.id_tree like #{regionIdTreeLike}
</if>
<if test="vehicleModel != null and vehicleModel != ''" >
and od.vehicle_model like CONCAT(CONCAT('%', #{vehicleModel,jdbcType=VARCHAR}),'%')
</if>
group by od.install_supplier_id
<if test="regionId == null" >
,od.region_id, tr.name
</if>
ORDER BY
od.region_id+0 asc,
od.install_supplier_id+0 asc
</select>
<select id="countOrderGroupBySupplier" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.ReportOrderBo">
select
od.install_supplier_id as supplier_id, ts.name as supplier_name,
count(1) as count_total,
sum(case od.status when 64 then 1 else 0 end) as count_closed,
sum(case when od.install_finish_time is null then 1 else 0 end) as count_unfinished,
sum(case when od.install_finish_time is null then 0 else 1 end) as count_finished
from t_order od
join t_supplier ts on od.install_supplier_id = ts.id
<if test="beginTime != null and beginTime != ''" >
JOIN t_operate_log log on log.third_party_id=od.id and log.name=10
</if>
where 1=1
<if test="beginTime != null and beginTime != ''" >
and log.create_time <![CDATA[ >= ]]> #{beginTime,jdbcType=VARCHAR}
</if>
<if test="endTime != null and endTime != ''" >
and log.create_time <![CDATA[ <= ]]> #{endTime,jdbcType=VARCHAR}
</if>
<include refid="reportOrderWhere" />
group by od.install_supplier_id,ts.name
</select>
<select id="calcOrderFinishedTime" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.ReportOrderBo">
select od.install_supplier_id as supplier_id,
avg(timestampdiff(hour, ol.create_time, od.install_finish_time)) as avg_install_time
from t_order od
join t_operate_log ol on od.id = ol.third_party_id and ol.name=7
<if test="beginTime != null and beginTime != ''" >
JOIN t_operate_log log on log.third_party_id=od.id and log.name=10
</if>
where 1 = 1
<if test="beginTime != null and beginTime != ''" >
and log.create_time <![CDATA[ >= ]]> #{beginTime,jdbcType=VARCHAR}
</if>
<if test="endTime != null and endTime != ''" >
and log.create_time <![CDATA[ <= ]]> #{endTime,jdbcType=VARCHAR}
</if>
<include refid="reportOrderWhere" />
group by od.install_supplier_id
</select>
<select id="orderResponseToAdmin" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
convert(ifnull(
sum(
timestampdiff(
SECOND,
od.dispatch_time,
od.create_time
)/3600
),
0
) / COUNT(1),decimal(10,2)) as order_response,
COUNT(od.id) cnt,
sp.id as supplier_id,sp.NAME as supplier_name
FROM
t_supplier sp
left join
(
select o.id,o.install_supplier_id,o.dispatch_time,ol.create_time from t_order o
LEFT JOIN t_region r ON r.id = o.region_id
LEFT JOIN t_operate_log ol ON o.id = ol.third_party_id
where ol.NAME = '13'
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and o.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and o.dispatch_time &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and o.dispatch_time &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
) od ON od.install_supplier_id = sp.id
WHERE 1=1
<if test="supplierId != null and supplierId != ''" >
and sp.id in
<foreach collection="supplierId.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY od.install_supplier_id,sp.NAME
</select>
<select id="surveyResponseToAdmin" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
convert(ifnull(
sum(
timestampdiff(
SECOND,
od.dispatch_time,
od.survey_finish_time
)/3600
),
0
) / 24 / count(1),decimal(10,2)) as order_response,
COUNT(od.id) cnt,
sp.id as supplier_id,sp.NAME as supplier_name
FROM
t_supplier sp
left join
(
select o.id,o.install_supplier_id,o.dispatch_time,o.survey_finish_time from t_order o
LEFT JOIN t_region r ON r.id = o.region_id
where o.survey_finish_time is not null
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and o.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and o.dispatch_time &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and o.dispatch_time &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
) od ON od.install_supplier_id = sp.id
WHERE
1=1
<if test="supplierId != null and supplierId != ''" >
and sp.id in
<foreach collection="supplierId.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY od.install_supplier_id,sp.NAME
</select>
<select id="installResponseToAdmin" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
convert(ifnull(
sum(
timestampdiff(
SECOND,
od.dispatch_time,
od.install_finish_time
)/3600
),
0
) / 24 / count(1),decimal(10,2)) as order_response,
COUNT(od.id) cnt,
sp.id as supplier_id,sp.NAME as supplier_name
FROM
t_supplier sp
left join
(
select o.id,o.install_supplier_id,o.dispatch_time,o.install_finish_time from t_order o
LEFT JOIN t_region r ON r.id = o.region_id
where o.install_finish_time is not null
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and o.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and o.dispatch_time &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and o.dispatch_time &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
) od ON od.install_supplier_id = sp.id
WHERE
1=1
<if test="supplierId != null and supplierId != ''" >
and sp.id in
<foreach collection="supplierId.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY od.install_supplier_id,sp.NAME
</select>
<select id="installEfficientToAdmin" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
convert(ifnull(
sum(
CASE
WHEN od.`status` IN (46, 49, 52, 61) THEN
1
ELSE
0
END
),
0
) / count(1)*100,decimal(10,2)) as order_response,
COUNT(od.id) cnt,
sp.id as supplier_id,sp.NAME as supplier_name
FROM
t_supplier sp
left join
(
select o.id,o.install_supplier_id,o.dispatch_time,o.status from t_order o
LEFT JOIN t_region r ON r.id = o.region_id
where o.STATUS != 64
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and o.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and o.dispatch_time &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and o.dispatch_time &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
) od ON od.install_supplier_id = sp.id
WHERE
1=1
<if test="supplierId != null and supplierId != ''" >
and sp.id in
<foreach collection="supplierId.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
GROUP BY od.install_supplier_id,sp.NAME
</select>
<select id="reportPassToAdmin" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
ifnull(od.order_response,0) as order_response,
od.cnt,
sp.id as supplier_id,sp.NAME as supplier_name
FROM
t_supplier sp
left join
(
select
o.install_supplier_id,
convert((count(DISTINCT o.id) - count(DISTINCT l2.third_party_id) ) / count(DISTINCT o.id)*100,decimal(10,2)) as order_response,
count(DISTINCT o.id) cnt
from t_order o
LEFT JOIN t_region r ON r.id = o.region_id
LEFT JOIN t_operate_log l1 ON o.id = l1.third_party_id
LEFT JOIN t_operate_log l2 ON l2.third_party_id = l1.third_party_id
<if test="type == 1">
and l2.`NAME` = '28'
WHERE l1.`NAME` in( '25','28')
</if>
<if test="type == 2">
and l2.`NAME` = '55'
WHERE l1.`NAME` in( '52','55')
</if>
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and o.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and l1.create_time &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and l1.create_time &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
GROUP BY
o.install_supplier_id
) od ON od.install_supplier_id = sp.id
WHERE 1=1
<if test="supplierId != null and supplierId != ''" >
and sp.id in
<foreach collection="supplierId.split(',')" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
ORDER BY od.install_supplier_id,sp.NAME
</select>
<select id="orderResponseToSupplier" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
convert(ifnull(
sum(
timestampdiff(
SECOND,
od.dispatch_time,
ol.create_time
)/3600
),
0
) / COUNT(1),decimal(10,2)) as order_response,
DATE_FORMAT(ol.create_time,'%Y-%m') as month
FROM
t_order od
LEFT JOIN t_region r ON r.id = od.region_id
LEFT JOIN t_operate_log ol ON od.id = ol.third_party_id
WHERE
od.install_supplier_id = #{supplierId,jdbcType=VARCHAR} AND ol.NAME = '13'
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and od.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
GROUP BY DATE_FORMAT(od.dispatch_time,'%Y-%m')
</select>
<select id="surveyResponseToSupplier" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
convert(ifnull(
sum(
timestampdiff(
SECOND,
od.dispatch_time,
od.survey_finish_time
)/3600
),
0
) / 24 / count(1),decimal(10,2)) as order_response,
DATE_FORMAT(od.dispatch_time,'%Y-%m') as month
FROM
t_order od
LEFT JOIN t_region r ON r.id = od.region_id
WHERE od.survey_finish_time is not null
and od.install_supplier_id = #{supplierId,jdbcType=VARCHAR}
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and od.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
GROUP BY DATE_FORMAT(od.dispatch_time,'%Y-%m')
</select>
<select id="installResponseToSupplier" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
convert(ifnull(
sum(
timestampdiff(
SECOND,
od.dispatch_time,
od.install_finish_time
)/3600
),
0
) / 24 / count(1),decimal(10,2)) as order_response,
DATE_FORMAT(od.dispatch_time,'%Y-%m') as month
FROM
t_order od
LEFT JOIN t_region r ON r.id = od.region_id
WHERE od.install_finish_time is not null
and od.install_supplier_id = #{supplierId,jdbcType=VARCHAR}
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and od.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
GROUP BY DATE_FORMAT(od.dispatch_time,'%Y-%m')
</select>
<select id="installEfficientToSupplier" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
convert(ifnull(
sum(
CASE
WHEN od.`status` IN (46, 49, 52, 61) THEN
1
ELSE
0
END
),
0
) / count(1)*100,decimal(10,2)) as order_response,
DATE_FORMAT(od.dispatch_time,'%Y-%m') as month
FROM
t_order od
LEFT JOIN t_region r ON r.id = od.region_id
WHERE
od.STATUS != 64
and od.install_supplier_id = #{supplierId,jdbcType=VARCHAR}
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and od.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
GROUP BY DATE_FORMAT(od.dispatch_time,'%Y-%m')
</select>
<select id="reportPassToSupplier" resultType="com.boco.nbd.wios.manage.entity.bo.ReportOrderResponseDTO">
SELECT
convert((count(DISTINCT od.id) - count(DISTINCT l2.third_party_id) ) / count(DISTINCT od.id)*100,decimal(10,2)) as order_response,
DATE_FORMAT(l1.create_time,'%Y-%m') as month
FROM
t_order od
LEFT JOIN t_region r ON r.id = od.region_id
LEFT JOIN t_operate_log l1 ON od.id = l1.third_party_id
LEFT JOIN t_operate_log l2 ON l2.third_party_id = l1.third_party_id
<if test="type == 1">
and l2.`NAME` = '28'
WHERE l1.`NAME` in( '25','28')
</if>
<if test="type == 2">
and l2.`NAME` = '55'
WHERE l1.`NAME` in( '52','55')
</if>
and od.install_supplier_id = #{supplierId,jdbcType=VARCHAR}
<if test="dispatchBeginTime != null and dispatchBeginTime != ''" >
and DATE_FORMAT(l1.create_time,'%Y-%m') &gt;= #{dispatchBeginTime,jdbcType=VARCHAR}
</if>
<if test="dispatchEndTime != null and dispatchEndTime != ''" >
and DATE_FORMAT(l1.create_time,'%Y-%m') &lt;= #{dispatchEndTime,jdbcType=VARCHAR}
</if>
<if test="regionIdTree != null and regionIdTree != ''" >
<bind name="regionIdTreeLike" value="regionIdTree + '%'"/>
and r.id_tree like #{regionIdTreeLike}
</if>
<if test="oemId != null and oemId != ''" >
and od.oem_id = #{oemId,jdbcType=VARCHAR}
</if>
GROUP BY DATE_FORMAT(l1.create_time,'%Y-%m')
</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.boco.nbd.wios.flow.mapper.def.ReportStatisticsMapper">
<sql id="Base_Column_Country">
<if test="installSupplierId != null ">
and install_supplier_id in
<foreach collection="installSupplierId" item="installSupplierId" open="(" separator="," close=")">
#{installSupplierId}
</foreach>
</if>
<if test="regionId != null ">
and country_id in
<foreach collection="regionId" item="regionId" open="(" separator="," close=")">
#{regionId}
</foreach>
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
</sql>
<!--全国流转和归档订单总量-->
<select id="getCountryOrderCount" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select country_name region, install_supplier_name installSupplierName, count(*) ordersTotal
from t_order
where type=1 and process_ins_id is not null and (node_flag!=199 and status=64)=false
and install_supplier_name is not null
and country_name is not null
<include refid="Base_Column_Country" />
group by country_name, install_supplier_name
</select>
<!--全国正常归档订单总量-->
<select id="getCountryOrderCountNodeFlag199" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDurationStatisticsBO">
select country_name region, install_supplier_name installSupplierName, count(*) ordersTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and country_name is not null
and node_flag = '199'
<include refid="Base_Column_Country" />
group by country_name, install_supplier_name
</select>
<!--全国拒接数量-->
<select id="getCountryRefuseTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select country_name region, install_supplier_name installSupplierName, count(*) refuseTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and country_name is not null
and refuse_order_reason is not null
<include refid="Base_Column_Country" />
group by country_name, install_supplier_name;
</select>
<!--全国安装失败数量-->
<select id="getCountryInstallationFailedTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select country_name region, install_supplier_name installSupplierName, count(*) installationFailedTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and country_name is not null
and install_start_time is not null
and install_end_time is null
<include refid="Base_Column_Country" />
group by country_name, install_supplier_name;
</select>
<!--全国安装完成数量-->
<select id="getCountryInstallationCompleteTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select a.region,a.installSupplierName,sum(a.installationCompleteTotal) installationCompleteTotal
from
(select country_name region, install_supplier_name installSupplierName, count(*) installationCompleteTotal
from t_order
where type=1 and process_ins_id is not null and status!=64
and install_supplier_name is not null
and country_name is not null
and node_flag in ('113','114')
<include refid="Base_Column_Country" />
group by country_name, install_supplier_name
union
select country_name region, install_supplier_name installSupplierName, count(*) installationCompleteTotal
from t_order
where type=1 and process_ins_id is not null and status = 64
and install_supplier_name is not null
and country_name is not null
<include refid="Base_Column_Country" />
group by country_name, install_supplier_name
)a group by a.region, a.installSupplierName
</select>
<sql id="Base_Column_Area">
<if test="installSupplierId != null ">
and install_supplier_id in
<foreach collection="installSupplierId" item="installSupplierId" open="(" separator="," close=")">
#{installSupplierId}
</foreach>
</if>
<if test="regionId != null ">
and area_id in
<foreach collection="regionId" item="regionId" open="(" separator="," close=")">
#{regionId}
</foreach>
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
</sql>
<!--区域流转和归档订单总量-->
<select id="getAreaOrderCount" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select area_name region, install_supplier_name installSupplierName, count(*) ordersTotal
from t_order
where type=1 and process_ins_id is not null and (node_flag!=199 and status=64)=false
and install_supplier_name is not null
and area_name is not null
<include refid="Base_Column_Area" />
group by area_name, install_supplier_name
</select>
<!--区域正常归档订单总量-->
<select id="getAreaOrderCountNodeFlag199" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDurationStatisticsBO">
select area_name region, install_supplier_name installSupplierName, count(*) ordersTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and area_name is not null
and node_flag = '199'
<include refid="Base_Column_Country" />
group by area_name, install_supplier_name
</select>
<!--区域拒接数量-->
<select id="getAreaRefuseTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select area_name region, install_supplier_name installSupplierName, count(*) refuseTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and area_name is not null
and refuse_order_reason is not null
<include refid="Base_Column_Area" />
group by area_name, install_supplier_name
</select>
<!--区域安装失败数量-->
<select id="getAreaInstallationFailedTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select area_name region, install_supplier_name installSupplierName, count(*) installationFailedTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and area_name is not null
and install_start_time is not null
and install_end_time is null
<include refid="Base_Column_Area" />
group by area_name, install_supplier_name
</select>
<!--区域安装完成数量-->
<select id="getAreaInstallationCompleteTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select a.region,a.installSupplierName,sum(a.installationCompleteTotal) installationCompleteTotal
from
(select area_name region, install_supplier_name installSupplierName, count(*) installationCompleteTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and area_name is not null
and node_flag in ('113','114')
<include refid="Base_Column_Area" />
group by area_name, install_supplier_name
union
select area_name region, install_supplier_name installSupplierName, count(*) installationCompleteTotal
from t_order
where type=1 and process_ins_id is not null and status = 64
and install_supplier_name is not null
and area_name is not null
<include refid="Base_Column_Area" />
group by area_name, install_supplier_name
)a group by a.region, a.installSupplierName
</select>
<sql id="Base_Column_Province">
<if test="installSupplierId != null ">
and install_supplier_id in
<foreach collection="installSupplierId" item="installSupplierId" open="(" separator="," close=")">
#{installSupplierId}
</foreach>
</if>
<if test="regionId != null ">
and province_id in
<foreach collection="regionId" item="regionId" open="(" separator="," close=")">
#{regionId}
</foreach>
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
</sql>
<!--省份流转和归档订单总量-->
<select id="getProvinceOrderCount" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select province_name region, install_supplier_name installSupplierName, count(*) ordersTotal
from t_order
where type=1 and process_ins_id is not null and (node_flag!=199 and status=64)=false
and install_supplier_name is not null
and province_name is not null
<include refid="Base_Column_Province" />
group by province_name, install_supplier_name
</select>
<!--省份正常归档订单总量-->
<select id="getProvinceOrderCountNodeFlag199" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDurationStatisticsBO">
select province_name region, install_supplier_name installSupplierName, count(*) ordersTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and province_name is not null
and node_flag = '199'
<include refid="Base_Column_Country" />
group by province_name, install_supplier_name
</select>
<!--省份拒接数量-->
<select id="getProvinceRefuseTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select province_name region, install_supplier_name installSupplierName, count(*) refuseTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and province_name is not null
and refuse_order_reason is not null
<include refid="Base_Column_Province" />
group by province_name, install_supplier_name
</select>
<!--省份安装失败数量-->
<select id="getProvinceInstallationFailedTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select province_name region, install_supplier_name installSupplierName, count(*) installationFailedTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and province_name is not null
and install_start_time is not null
and install_end_time is null
<include refid="Base_Column_Province" />
group by province_name, install_supplier_name
</select>
<!--省份安装完成数量-->
<select id="getProvinceInstallationCompleteTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select a.region,a.installSupplierName,sum(a.installationCompleteTotal) installationCompleteTotal
from
(select province_name region, install_supplier_name installSupplierName, count(*) installationCompleteTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and province_name is not null
and node_flag in ('113','114')
<include refid="Base_Column_Province" />
group by province_name, install_supplier_name
union
select province_name region, install_supplier_name installSupplierName, count(*) installationCompleteTotal
from t_order
where type=1 and process_ins_id is not null and status = 64
and install_supplier_name is not null
and province_name is not null
<include refid="Base_Column_Province" />
group by province_name, install_supplier_name
)a group by a.region, a.installSupplierName
</select>
<sql id="Base_Column_Region">
<if test="installSupplierId != null ">
and install_supplier_id in
<foreach collection="installSupplierId" item="installSupplierId" open="(" separator="," close=")">
#{installSupplierId}
</foreach>
</if>
<if test="regionId != null ">
and region_id in
<foreach collection="regionId" item="regionId" open="(" separator="," close=")">
#{regionId}
</foreach>
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
</sql>
<!--地市流转和归档订单总量-->
<select id="getRegionOrderCount" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select region_name region, install_supplier_name installSupplierName, count(*) ordersTotal
from t_order
where type=1 and process_ins_id is not null and (node_flag!=199 and status=64)=false
and install_supplier_name is not null
and region_name is not null
<include refid="Base_Column_Region" />
group by region_name, install_supplier_name
</select>
<!--地市正常归档订单总量-->
<select id="getRegionOrderCountNodeFlag199" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDurationStatisticsBO">
select region_name region, install_supplier_name installSupplierName, count(*) ordersTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and region_name is not null
and node_flag = '199'
<include refid="Base_Column_Country" />
group by region_name, install_supplier_name
</select>
<!--地市拒接数量-->
<select id="getRegionRefuseTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select region_name region, install_supplier_name installSupplierName, count(*) refuseTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and region_name is not null
and refuse_order_reason is not null
<include refid="Base_Column_Region" />
group by region_name, install_supplier_name
</select>
<!--地市安装失败数量-->
<select id="getRegionInstallationFailedTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select region_name region, install_supplier_name installSupplierName, count(*) installationFailedTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and region_name is not null
and install_start_time is not null
and install_end_time is null
<include refid="Base_Column_Region" />
group by region_name, install_supplier_name
</select>
<!--地市安装完成数量-->
<select id="getRegionInstallationCompleteTotal" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.bo.InstallationDataStatisticsBO">
select a.region,a.installSupplierName,sum(a.installationCompleteTotal) installationCompleteTotal
from
(select region_name region, install_supplier_name installSupplierName, count(*) installationCompleteTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and region_name is not null
and node_flag in ('113','114')
<include refid="Base_Column_Region" />
group by region_name, install_supplier_name
union
select region_name region, install_supplier_name installSupplierName, count(*) installationCompleteTotal
from t_order
where type=1 and process_ins_id is not null
and install_supplier_name is not null
and region_name is not null
<include refid="Base_Column_Region" />
group by region_name, install_supplier_name
)a group by a.region, a.installSupplierName
</select>
<!--节点订单查询-->
<select id="getOrderByNodeFlag" resultType="java.lang.String">
select process_ins_id
from t_order
where type=1 and process_ins_id is not null
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
<if test='regionLevel == "1"'>
and country_name = #{region}
and install_supplier_name = #{installSupplierName}
</if>
<if test='regionLevel == "2"'>
and area_name = #{region}
and install_supplier_name = #{installSupplierName}
</if>
<if test='regionLevel == "3"'>
and province_name = #{region}
and install_supplier_name = #{installSupplierName}
</if>
<if test='regionLevel == "4"'>
and region_name = #{region}
and install_supplier_name = #{installSupplierName}
</if>
<if test='type == "1"'>
and node_flag > '112'
</if>
<if test='type == "2"'>
and node_flag = '199'
</if>
</select>
<!--安装完成安装数量(安装入场时间,安装离场时间均不为空的工单个数)-->
<select id="getInstallationCompleteTotal" resultType="java.lang.Integer">
select count(*)
from t_order
where type=1 and process_ins_id is not null
and install_start_time is not null
and install_end_time is not null
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
<if test='regionLevel == "1"'>
and country_name = #{region}
and install_supplier_name = #{installSupplierName}
</if>
<if test='regionLevel == "2"'>
and area_name = #{region}
and install_supplier_name = #{installSupplierName}
</if>
<if test='regionLevel == "3"'>
and province_name = #{region}
and install_supplier_name = #{installSupplierName}
</if>
<if test='regionLevel == "4"'>
and region_name = #{region}
and install_supplier_name = #{installSupplierName}
</if>
</select>
<select id="getOrderFiled" parameterType="com.boco.nbd.wios.flow.entity.bo.ReportStatisticsBO" resultType="com.boco.nbd.wios.flow.entity.po.OrderPO">
select *
from t_order
where type=1 and process_ins_id is not null and node_flag = '199'
<if test='regionLevel == "1"'>
<include refid="Base_Column_Country" />
</if>
<if test='regionLevel == "2"'>
<include refid="Base_Column_Area" />
</if>
<if test='regionLevel == "3"'>
<include refid="Base_Column_Province" />
</if>
<if test='regionLevel == "4"'>
<include refid="Base_Column_Region" />
</if>
<if test='regionLevel == "4"'>
<include refid="Base_Column_Region" />
</if>
<if test="oemId != null and oemId != ''">
and oem_id = #{oemId}
</if>
<if test="regionLevel == null or regionLevel == ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
<if test="installSupplierId != null ">
and install_supplier_id in
<foreach collection="installSupplierId" item="installSupplierId" open="(" separator="," close=")">
#{installSupplierId}
</foreach>
</if>
</if>
<if test="electricExpand != null and electricExpand != ''">
and electric_expand = #{electricExpand}
</if>
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.RoleMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Role" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="remark" property="remark" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="parent_id" property="parentId" jdbcType="INTEGER" />
<result column="create_account_id" property="createAccountId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
id, name, remark, status,parent_id, create_account_id, create_time
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from wb_role
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
select
<include refid="Base_Column_List" />
from wb_role
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
delete from wb_role
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
delete from wb_role
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Role" useGeneratedKeys="true" keyProperty="id">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
insert into wb_role (id, name, remark,
status,parent_id, create_account_id, create_time
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER},#{parentId,jdbcType=INTEGER}, #{createAccountId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Role" useGeneratedKeys="true" keyProperty="id">
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
insert into wb_role
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="name != null" >
name,
</if>
<if test="remark != null" >
remark,
</if>
<if test="status != null" >
status,
</if>
<if test="parentId != null" >
parent_id,
</if>
<if test="createAccountId != null" >
create_account_id,
</if>
<if test="createTime != null" >
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
#{remark,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="parentId != null" >
#{parentId,jdbcType=INTEGER},
</if>
<if test="createAccountId != null" >
#{createAccountId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleCriteria" resultType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
select count(*) from wb_role
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
update wb_role
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.name != null" >
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.remark != null" >
remark = #{record.remark,jdbcType=VARCHAR},
</if>
<if test="record.status != null" >
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.parentId != null" >
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if test="record.createAccountId != null" >
create_account_id = #{record.createAccountId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
update wb_role
set id = #{record.id,jdbcType=INTEGER},
name = #{record.name,jdbcType=VARCHAR},
remark = #{record.remark,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
parent_id = #{record.parentId,jdbcType=INTEGER},
create_account_id = #{record.createAccountId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Role" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
update wb_role
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="remark != null" >
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="createAccountId != null" >
create_account_id = #{createAccountId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.Role" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 18 17:08:33 CST 2020.
-->
update wb_role
set name = #{name,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
parent_id = #{parentId,jdbcType=INTEGER},
create_account_id = #{createAccountId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</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.boco.nbd.wios.manage.mapper.def.RoleMenuMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.RoleMenu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
<id column="id" property="id" jdbcType="INTEGER" />
<result column="role_id" property="roleId" jdbcType="INTEGER" />
<result column="menu_id" property="menuId" jdbcType="VARCHAR" />
<result column="create_account_id" property="createAccountId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
<where >
<foreach collection="example.oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
id, role_id, menu_id, create_account_id, create_time
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleMenuCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from wb_role_menu
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
select
<include refid="Base_Column_List" />
from wb_role_menu
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
delete from wb_role_menu
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleMenuCriteria" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
delete from wb_role_menu
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleMenu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
insert into wb_role_menu (id, role_id, menu_id,
create_account_id, create_time)
values (#{id,jdbcType=INTEGER}, #{roleId,jdbcType=INTEGER}, #{menuId,jdbcType=VARCHAR},
#{createAccountId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleMenu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
insert into wb_role_menu
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="roleId != null" >
role_id,
</if>
<if test="menuId != null" >
menu_id,
</if>
<if test="createAccountId != null" >
create_account_id,
</if>
<if test="createTime != null" >
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="roleId != null" >
#{roleId,jdbcType=INTEGER},
</if>
<if test="menuId != null" >
#{menuId,jdbcType=VARCHAR},
</if>
<if test="createAccountId != null" >
#{createAccountId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleMenuCriteria" resultType="java.lang.Integer" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
select count(*) from wb_role_menu
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
update wb_role_menu
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.roleId != null" >
role_id = #{record.roleId,jdbcType=INTEGER},
</if>
<if test="record.menuId != null" >
menu_id = #{record.menuId,jdbcType=VARCHAR},
</if>
<if test="record.createAccountId != null" >
create_account_id = #{record.createAccountId,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
update wb_role_menu
set id = #{record.id,jdbcType=INTEGER},
role_id = #{record.roleId,jdbcType=INTEGER},
menu_id = #{record.menuId,jdbcType=VARCHAR},
create_account_id = #{record.createAccountId,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleMenu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
update wb_role_menu
<set >
<if test="roleId != null" >
role_id = #{roleId,jdbcType=INTEGER},
</if>
<if test="menuId != null" >
menu_id = #{menuId,jdbcType=VARCHAR},
</if>
<if test="createAccountId != null" >
create_account_id = #{createAccountId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.RoleMenu" >
<!--
WARNING - @mbggenerated
This element is automatically generated by MyBatis Generator, do not modify.
This element was generated on Mon May 25 10:18:21 CST 2020.
-->
update wb_role_menu
set role_id = #{roleId,jdbcType=INTEGER},
menu_id = #{menuId,jdbcType=VARCHAR},
create_account_id = #{createAccountId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</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.boco.nbd.wios.manage.mapper.def.ScoreConfigMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.ScoreConfig">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="parent_code" jdbcType="VARCHAR" property="parentCode" />
<result column="parent_name" jdbcType="VARCHAR" property="parentName" />
<result column="weight" jdbcType="INTEGER" property="weight" />
<result column="parent_weight" jdbcType="INTEGER" property="parentWeight" />
<result column="source" jdbcType="VARCHAR" property="source" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, code, name, status, type, parent_code, weight, source, description, create_account,
create_time, modify_account, modify_time
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.ScoreConfig">
insert into t_score_config (id, code, name,
status, type, parent_code,
weight, source, description,
create_account, create_time, modify_account,
modify_time)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR},
#{weight,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.ScoreConfig">
update t_score_config
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="weight != null">
weight = #{weight,jdbcType=INTEGER},
</if>
<if test="source != null">
source = #{source,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_score_config
where id = #{id,jdbcType=INTEGER}
</select>
<select id="getListByType" parameterType="java.lang.String" resultMap="BaseResultMap">
select
ts.id, ts.code, ts.name, ts.status, ts.type, ts.parent_code, ts.weight, ts.source, ts.description, ts.create_account,
ts.create_time, ts.modify_account, ts.modify_time,
ts2.name as parent_name,
ts2.weight as parent_weight
from t_score_config ts
left join t_score_config ts2 on ts.parent_code = ts2.code and ts2.status=1
where ts.type = #{type,jdbcType=VARCHAR} and ts.status =1
</select>
<select id="selectByCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_score_config
where code = #{code,jdbcType=VARCHAR}
</select>
<select id="selectByParentCodeCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_score_config
where parent_code = #{parentCode,jdbcType=VARCHAR}
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.score.mapper.def.ScoreConfigV2Mapper">
<delete id="truncateData">
update t_score_config_v2 set status=0
</delete>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.ScoreSupplierDetailMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.ScoreSupplierDetail">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="score_supplier_id" jdbcType="INTEGER" property="scoreSupplierId" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="parent_code" jdbcType="VARCHAR" property="parentCode" />
<result column="parent_name" jdbcType="VARCHAR" property="parentName" />
<result column="parent_weight" jdbcType="VARCHAR" property="parentWeight" />
<result column="weight" jdbcType="INTEGER" property="weight" />
<result column="score" jdbcType="DECIMAL" property="score" />
<result column="result_calc" jdbcType="DECIMAL" property="resultCalc" />
<result column="source" jdbcType="VARCHAR" property="source" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
tss.id, tss.score_supplier_id, tss.code, tss.name, tss.status, tss.type, tss.parent_code,tss.score, tss.result_calc, tss.weight, tss.source, tss.description, tss.create_account,
tss.create_time, tss.modify_account, tss.modify_time
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.ScoreSupplierDetail">
insert into t_score_supplier_detail (id, score_supplier_id, code, name,
status, type, parent_code,
weight,score, source, description,
create_account, create_time, modify_account,
modify_time)
values (#{id,jdbcType=INTEGER}, #{iscore_supplier_id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{type,jdbcType=VARCHAR}, #{parentCode,jdbcType=VARCHAR},
#{weight,jdbcType=INTEGER}, #{score,jdbcType=INTEGER}, #{source,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.ScoreSupplierDetail">
update t_score_supplier_detail
<set>
<if test="score != null">
score = #{score,jdbcType=DECIMAL},
</if>
<if test="resultCalc != null">
result_calc = #{resultCalc,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByCode" parameterType="com.boco.nbd.wios.manage.entity.bo.ScoreSupplierDetail">
update t_score_supplier_detail
<set>
<if test="score != null">
score = #{score,jdbcType=DECIMAL},
</if>
<if test="resultCalc != null">
result_calc = #{resultCalc,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where score_supplier_id = #{scoreSupplierId,jdbcType=INTEGER}
and code = #{code,jdbcType=VARCHAR}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_score_supplier_detail tss
where tss.id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.ScoreSupplierDetail" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />,
ts.name as parent_name,
ts.weight as parent_weight
from t_score_supplier_detail tss
join t_score_config ts on tss.parent_code=ts.code and ts.status=1
where tss.score_supplier_id = #{scoreSupplierId,jdbcType=INTEGER}
<if test="code != null">
and tss.code = #{code,jdbcType=VARCHAR}
</if>
<if test="parentCode != null">
and tss.parent_code = #{parentCode,jdbcType=VARCHAR}
</if>
</select>
<select id="getListByScoreSupplierId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />,
ts.name as parent_name
from t_score_supplier_detail tss
left join t_score_config ts on tss.parent_code=ts.code and ts.status=1
where tss.score_supplier_id = #{scoreSupplierId,jdbcType=VARCHAR} and tss.status =1
</select>
<select id="getListByScoreSupplierIdAndParentCode" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_score_supplier_detail tss
where tss.score_supplier_id = #{scoreSupplierId} and tss.status =1 and parent_code=#{parentCode}
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.score.mapper.def.ScoreSupplierItemMapper">
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.ScoreSupplierMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.ScoreSupplierDTO">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="supplier_id" jdbcType="INTEGER" property="supplierId" />
<result column="supplier_name" jdbcType="VARCHAR" property="supplierName" />
<result column="region_id" jdbcType="INTEGER" property="regionId" />
<result column="region_name" jdbcType="VARCHAR" property="regionName" />
<result column="month" jdbcType="VARCHAR" property="month" />
<result column="final_score" jdbcType="INTEGER" property="finalScore" />
<result column="final_purchasing" jdbcType="INTEGER" property="finalPurchasing" />
<result column="final_engineering" jdbcType="INTEGER" property="finalEngineering" />
<result column="online" jdbcType="INTEGER" property="online" />
<result column="offline" jdbcType="INTEGER" property="offline" />
<result column="customer" jdbcType="INTEGER" property="customer" />
<result column="final_deduct" jdbcType="INTEGER" property="finalDeduct" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
ts.id, ts.supplier_id, ts.region_id, ts.month, ts.final_score, ts.final_purchasing, ts.final_engineering,
ts.online, ts.offline, ts.customer, ts.final_deduct, ts.description, ts.status, ts.create_account,
ts.create_time, ts.modify_account, ts.modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_score_supplier
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.ScoreSupplier">
insert into t_score_supplier (id, supplier_id, region_id,
month, final_score, final_purchasing,
final_engineering, online, offline,
customer, final_deduct, description, status,
create_account, create_time, modify_account,
modify_time)
values (#{id,jdbcType=INTEGER}, #{supplierId,jdbcType=VARCHAR}, #{regionId,jdbcType=VARCHAR},
#{month,jdbcType=VARCHAR}, #{finalScore,jdbcType=INTEGER}, #{finalPurchasing,jdbcType=INTEGER},
#{finalEngineering,jdbcType=INTEGER}, #{online,jdbcType=INTEGER}, #{offline,jdbcType=INTEGER},
#{customer,jdbcType=INTEGER}, #{finalDeduct,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.ScoreSupplier">
update t_score_supplier
<set>
<if test="finalScore != null">
final_score = #{finalScore,jdbcType=INTEGER},
</if>
<if test="finalPurchasing != null">
final_purchasing = #{finalPurchasing,jdbcType=INTEGER},
</if>
<if test="finalEngineering != null">
final_engineering = #{finalEngineering,jdbcType=INTEGER},
</if>
<if test="online != null">
online = #{online,jdbcType=INTEGER},
</if>
<if test="offline != null">
offline = #{offline,jdbcType=INTEGER},
</if>
<if test="customer != null">
customer = #{customer,jdbcType=INTEGER},
</if>
<if test="finalDeduct != null">
final_deduct = #{finalDeduct,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" /> ,
sp.code as supplier_code,
sp.name as supplier_name,
sp.contact_name,
sp.contact_phone,
tr.name as region_name
from t_score_supplier ts
left join t_supplier sp on ts.supplier_id = sp.id
left join t_region tr on ts.region_id = tr.id
where ts.id = #{id,jdbcType=INTEGER}
</select>
<select id="selectLastBySupplierId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" /> ,
sp.code as supplier_code,
sp.name as supplier_name,
sp.contact_name,
sp.contact_phone,
tr.name as region_name
from t_score_supplier ts
left join t_supplier sp on ts.supplier_id = sp.id
left join t_region tr on ts.region_id = tr.id
where ts.supplier_id = #{supplierId,jdbcType=INTEGER}
and final_score >0
order by modify_time desc
LIMIT 1
</select>
<sql id="findPageWithWhere">
<where> 1=1
<if test="id != null" >
and ts.id = #{id,jdbcType=INTEGER}
</if>
<if test="supplierId != null" >
and ts.supplier_id = #{supplierId,jdbcType=VARCHAR}
</if>
<if test="supplierCode != null and supplierCode != ''" >
and sp.code like CONCAT(CONCAT('%', #{supplierCode,jdbcType=VARCHAR}),'%')
</if>
<if test="supplierName != null and supplierName != ''" >
and sp.name like CONCAT(CONCAT('%', #{supplierName,jdbcType=VARCHAR}),'%')
</if>
<if test="regionId != null " >
and ts.region_id = #{regionId,jdbcType=VARCHAR}
</if>
<if test="month != null and month != ''" >
and ts.month = #{month,jdbcType=VARCHAR}
</if>
<if test="description != null and description != ''" >
and ts.description = #{description,jdbcType=VARCHAR}
</if>
<if test="status != null" >
and ts.status = #{status,jdbcType=INTEGER}
</if>
<if test="createAccount != null and createAccount != ''" >
and ts.create_account = #{createAccount,jdbcType=VARCHAR}
</if>
<if test="createTime != null" >
and ts.create_time = #{createTime,jdbcType=TIMESTAMP}
</if>
<if test="modifyAccount != null and modifyAccount != ''" >
and ts.modify_account = #{modifyAccount,jdbcType=VARCHAR}
</if>
<if test="modifyTime != null" >
and ts.modify_time = #{modifyTime,jdbcType=TIMESTAMP}
</if>
</where>
</sql>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.ScoreSupplierDTO" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" /> ,
sp.code as supplier_code,
sp.name as supplier_name,
sp.contact_name,
sp.contact_phone,
tr.name as region_name
from t_score_supplier ts
left join t_supplier sp on ts.supplier_id = sp.id
left join t_region tr on ts.region_id = tr.id
<include refid="findPageWithWhere" />
order by sp.name
</select>
<insert id="insertMonthDetail" parameterType="java.lang.Long">
insert into t_score_supplier_detail ( score_supplier_id, code, name,
status, type, parent_code,
weight,score, source, description,
create_account, create_time, modify_account,
modify_time)
SELECT #{scoreSupplierId,jdbcType=INTEGER}, sc.code, sc.name,
1, sc.type, sc.parent_code,
sc.weight,0, sc.source, '',
1,NOW(), 1, NOW()
from t_score_config sc
where sc.status=1
</insert>
<select id="countOrder" resultType="java.lang.Integer">
select
count(1) as cnt
from t_order od
join t_operate_log ol on od.id = ol.third_party_id
where
od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and od.region_id = #{regionId,jdbcType=INTEGER}
and ol.name = #{orderStatus,jdbcType=VARCHAR}
and (SELECT DATE_FORMAT(ol.create_time,'%Y-%m') = #{month,jdbcType=VARCHAR})
</select>
<select id="countChangeSupplier" resultType="java.lang.Integer">
select
count(1) as cnt
from t_operate_log ol
where
ol.type =3
and ol.pre_name = #{supplierId,jdbcType=INTEGER}
and (SELECT DATE_FORMAT(ol.create_time,'%Y-%m') &gt;= #{threeMonthBefore,jdbcType=VARCHAR})
and (SELECT DATE_FORMAT(ol.create_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR})
</select>
<select id="calcOrderFinishedTime" resultType="java.lang.Integer">
select avg(timestampdiff(hour, ol.create_time, od.install_finish_time))
from t_order od
join t_operate_log ol on od.id = ol.third_party_id
where
od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and od.region_id = #{regionId,jdbcType=INTEGER}
and ol.name = '7'
and (SELECT DATE_FORMAT(ol.create_time,'%Y-%m') = #{month,jdbcType=VARCHAR})
</select>
<select id="calcOrderResponseTime" resultType="java.lang.Integer">
select avg(timestampdiff(hour, ol.create_time, od.survey_reserve_time))
from t_order od
join t_operate_log ol on od.id = ol.third_party_id
where
od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and od.region_id = #{regionId,jdbcType=INTEGER}
and ol.name = '7'
and (SELECT DATE_FORMAT(ol.create_time,'%Y-%m') = #{month,jdbcType=VARCHAR})
</select>
<select id="calcOrderSurveyTime" resultType="java.lang.Integer">
select avg(timestampdiff(hour, ol.create_time, od.survey_finish_time))
from t_order od
join t_operate_log ol on od.id = ol.third_party_id
where
od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and od.region_id = #{regionId,jdbcType=INTEGER}
and ol.name = '7'
and (SELECT DATE_FORMAT(ol.create_time,'%Y-%m') = #{month,jdbcType=VARCHAR})
</select>
<select id="selectLastestScoreInfo" resultMap="BaseResultMap">
select * from t_score_supplier
where supplier_id=#{supplierId} and region_id=#{regionId}
order by create_time desc
limit 1
</select>
<select id="calcOrderScore" resultType="java.lang.Double">
select avg(od.score) as avgScore
from t_order od
join t_operate_log ol on od.id = ol.third_party_id
left join t_region r on r.id = od.region_id
where
od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and r.id_tree like '${regionIdTree}%'
and ol.name = '61'
and (SELECT DATE_FORMAT(ol.create_time,'%Y-%m') &gt;= #{threeMonthBefore,jdbcType=VARCHAR})
and (SELECT DATE_FORMAT(ol.create_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR})
</select>
<select id="countOrderByCondition" resultType="java.lang.Integer">
select
count(1) as cnt
from t_order od
left join t_region r on r.id = od.region_id
where (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{threeMonthBefore,jdbcType=VARCHAR})
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR})
and od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and r.id_tree like '${regionIdTree}%'
<if test="status != null">
and od.status != #{status}
</if>
</select>
<select id="countOrderHasFinished" resultType="java.lang.Integer">
select
count(1) as cnt
from t_order od
left join t_region r on r.id = od.region_id
where (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{threeMonthBefore,jdbcType=VARCHAR})
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR})
and od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and r.id_tree like '${regionIdTree}%'
and od.status in (46,49,52,61)
</select>
<select id="countOrderFinished" resultType="java.lang.Integer">
select count(1)
from t_order od
left join t_region r on r.id = od.region_id
where od.install_finish_time is not null
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{threeMonthBefore}
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR}
and od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and r.id_tree like '${regionIdTree}%'
</select>
<select id="countOrderFinishedTime" resultType="java.lang.Integer">
select sum(timestampdiff(second , od.dispatch_time, od.install_finish_time)/3600)
from t_order od
left join t_region r on r.id = od.region_id
where od.install_finish_time is not null
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{threeMonthBefore}
and DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR}
and od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and r.id_tree like '${regionIdTree}%'
</select>
<select id="countOrderResponse" resultType="java.lang.Integer">
select count(1)
from t_order od
join t_operate_log ol on od.id = ol.third_party_id
left join t_region r on r.id = od.region_id
where ol.name = '13'
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{threeMonthBefore,jdbcType=VARCHAR})
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR})
and od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and r.id_tree like '${regionIdTree}%'
</select>
<select id="countOrderResponseTime" resultType="java.lang.Integer">
select sum(timestampdiff(second, od.dispatch_time, ol.create_time)/3600)
from t_order od
join t_operate_log ol on od.id = ol.third_party_id
left join t_region r on r.id = od.region_id
where ol.name = '13'
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{threeMonthBefore,jdbcType=VARCHAR})
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR})
and od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and r.id_tree like '${regionIdTree}%'
</select>
<select id="countOrderSurvey" resultType="java.lang.Integer">
select count(1)
from t_order od
left join t_region r on r.id = od.region_id
where od.survey_finish_time is not null
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{threeMonthBefore,jdbcType=VARCHAR})
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR})
and od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and r.id_tree like '${regionIdTree}%'
</select>
<select id="countOrderSurveyTime" resultType="java.lang.Integer">
select sum(timestampdiff(second, od.dispatch_time, od.survey_finish_time)/3600)
from t_order od
left join t_region r on r.id = od.region_id
where od.survey_finish_time is not null
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &gt;= #{threeMonthBefore,jdbcType=VARCHAR})
and (SELECT DATE_FORMAT(od.dispatch_time,'%Y-%m') &lt;= #{month,jdbcType=VARCHAR})
and od.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and r.id_tree like '${regionIdTree}%'
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.score.mapper.def.ScoreSupplierV2Mapper">
<select id="queryScoreItem" resultType="com.boco.nbd.wios.score.entity.bo.ScoreItemBO">
select a.final_score,b.appraisal_id from t_score_supplier_item a
inner join t_score_config_v2 b on a.score_config_id=b.id
where a.score_supplier_id= #{scoreSupplierId}
</select>
<select id="queryScoreSupplier" resultType="com.boco.nbd.wios.score.entity.po.ScoreSupplierPO">
select a.*,(select group_concat(distinct appraisal_user)
from t_supplier_user_config b where b.supplier_config_id=a.supplier_config_id) appraisal_user
from t_score_supplier_v2 a
where 1=1
<if test="supplierId !=null">
and a.supplier_id= #{supplierId}
</if>
<if test="month!='' and month!=null">
and a.month = #{month}
</if>
order by create_time desc
</select>
<select id="getScoreSupplierItem" resultType="com.boco.nbd.wios.score.entity.bo.ScoreSupplierItemBO">
select a.id,
a.score_supplier_id,
a.score_config_id,
b.score_item,
b.total_score,
b.appraisal_department_id,
b.appraisal_id,
b.appraisal_describe,
b.appraisal_target,
b.appraisal_algorithm,
b.appraisal_department,
b.weight,
b.score_weight,
a.description,
a.final_score,
c.appraisal_user
from t_score_supplier_item a
inner join t_score_config_v2 b on a.score_config_id = b.id
left join t_supplier_user_config c on c.supplier_config_id = #{supplierConfigId}
and c.appraisal_department_id = b.appraisal_department_id
where a.score_supplier_id = #{scoreSupplierId}
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.SecretPhoneMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.flow.entity.SecretPhone">
<id column="phone" jdbcType="VARCHAR" property="phone" />
<result column="secret_no" jdbcType="VARCHAR" property="secretNo" />
<result column="pool_key" jdbcType="VARCHAR" property="poolKey" />
<result column="expired_time" jdbcType="TIMESTAMP" property="expiredTime" />
<result column="subs_id" jdbcType="VARCHAR" property="subsId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
phone, secret_no, pool_key, expired_time, subs_id, status, update_time, create_time
</sql>
<delete id="delete" parameterType="java.lang.String">
delete from t_secret_phone
where phone = #{phone,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.flow.entity.SecretPhone">
insert into t_secret_phone (phone, secret_no, pool_key,
expired_time, subs_id, status,
update_time, create_time)
values (#{phone,jdbcType=VARCHAR}, #{secretNo,jdbcType=VARCHAR}, #{poolKey,jdbcType=VARCHAR},
#{expiredTime,jdbcType=TIMESTAMP}, #{subsId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{updateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.flow.entity.SecretPhone">
insert into t_secret_phone
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="phone != null">
phone,
</if>
<if test="secretNo != null">
secret_no,
</if>
<if test="poolKey != null">
pool_key,
</if>
<if test="expiredTime != null">
expired_time,
</if>
<if test="subsId != null">
subs_id,
</if>
<if test="status != null">
status,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="secretNo != null">
#{secretNo,jdbcType=VARCHAR},
</if>
<if test="poolKey != null">
#{poolKey,jdbcType=VARCHAR},
</if>
<if test="expiredTime != null">
#{expiredTime,jdbcType=TIMESTAMP},
</if>
<if test="subsId != null">
#{subsId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.flow.entity.SecretPhone">
update t_secret_phone
<set>
<if test="secretNo != null">
secret_no = #{secretNo,jdbcType=VARCHAR},
</if>
<if test="poolKey != null">
pool_key = #{poolKey,jdbcType=VARCHAR},
</if>
<if test="expiredTime != null">
expired_time = #{expiredTime,jdbcType=TIMESTAMP},
</if>
<if test="subsId != null">
subs_id = #{subsId,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where phone = #{phone,jdbcType=VARCHAR}
</update>
<update id="update" parameterType="com.boco.nbd.wios.flow.entity.SecretPhone">
update t_secret_phone
set secret_no = #{secretNo,jdbcType=VARCHAR},
pool_key = #{poolKey,jdbcType=VARCHAR},
expired_time = #{expiredTime,jdbcType=TIMESTAMP},
subs_id = #{subsId,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP}
where phone = #{phone,jdbcType=VARCHAR}
</update>
<select id="selectByPhone" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_secret_phone
where phone = #{phone,jdbcType=VARCHAR} and status=1
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.flow.entity.SecretPhone"
resultType="com.boco.nbd.wios.flow.entity.SecretPhone">
select t.* from t_secret_phone t
<where>
<if test="secretNo != null and secretNo !=''">
and t.secret_no = #{secretNo}
</if>
<if test="status != null">
and t.status = #{status}
</if>
</where>
order by t.create_time desc
</select>
<select id="selectExpired"
resultType="com.boco.nbd.wios.flow.entity.SecretPhone">
select t.* from t_secret_phone t
where t.expired_time &lt;= now() and t.status=1
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SettlementDetailMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetail">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="settlement_id" jdbcType="VARCHAR" property="settlementId" />
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="user_phone" jdbcType="VARCHAR" property="userPhone" />
<result column="device_fee" jdbcType="DECIMAL" property="deviceFee" />
<result column="device_fee_with_tax" jdbcType="DECIMAL" property="deviceFeeWithTax" />
<result column="install_service_fee" jdbcType="DECIMAL" property="installServiceFee" />
<result column="install_service_fee_with_tax" jdbcType="DECIMAL" property="installServiceFeeWithTax" />
<result column="total_fee" jdbcType="DECIMAL" property="totalFee" />
<result column="total_fee_with_tax" jdbcType="DECIMAL" property="totalFeeWithTax" />
<result column="install_finish_time" jdbcType="TIMESTAMP" property="installFinishTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="is_del" jdbcType="INTEGER" property="isDel" />
</resultMap>
<sql id="Base_Column_List">
id, settlement_id, order_id, user_name, user_phone, device_fee, device_fee_with_tax,
install_service_fee, install_service_fee_with_tax, total_fee, total_fee_with_tax,
install_finish_time, create_time,is_del
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_settlement_detail
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetail">
insert into t_settlement_detail (id, settlement_id, order_id,
user_name, user_phone, device_fee,
device_fee_with_tax, install_service_fee, install_service_fee_with_tax,
total_fee, total_fee_with_tax, install_finish_time,
create_time)
values (#{id,jdbcType=INTEGER}, #{settlementId,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR},
#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, #{deviceFee,jdbcType=DECIMAL},
#{deviceFeeWithTax,jdbcType=DECIMAL}, #{installServiceFee,jdbcType=DECIMAL}, #{installServiceFeeWithTax,jdbcType=DECIMAL},
#{totalFee,jdbcType=DECIMAL}, #{totalFeeWithTax,jdbcType=DECIMAL}, #{installFinishTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetail">
insert into t_settlement_detail
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="settlementId != null">
settlement_id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="userName != null">
user_name,
</if>
<if test="userPhone != null">
user_phone,
</if>
<if test="deviceFee != null">
device_fee,
</if>
<if test="deviceFeeWithTax != null">
device_fee_with_tax,
</if>
<if test="installServiceFee != null">
install_service_fee,
</if>
<if test="installServiceFeeWithTax != null">
install_service_fee_with_tax,
</if>
<if test="totalFee != null">
total_fee,
</if>
<if test="totalFeeWithTax != null">
total_fee_with_tax,
</if>
<if test="installFinishTime != null">
install_finish_time,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="settlementId != null">
#{settlementId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
#{userPhone,jdbcType=VARCHAR},
</if>
<if test="deviceFee != null">
#{deviceFee,jdbcType=DECIMAL},
</if>
<if test="deviceFeeWithTax != null">
#{deviceFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="installServiceFee != null">
#{installServiceFee,jdbcType=DECIMAL},
</if>
<if test="installServiceFeeWithTax != null">
#{installServiceFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="totalFee != null">
#{totalFee,jdbcType=DECIMAL},
</if>
<if test="totalFeeWithTax != null">
#{totalFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="installFinishTime != null">
#{installFinishTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetail">
update t_settlement_detail
<set>
<if test="settlementId != null">
settlement_id = #{settlementId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
user_phone = #{userPhone,jdbcType=VARCHAR},
</if>
<if test="deviceFee != null">
device_fee = #{deviceFee,jdbcType=DECIMAL},
</if>
<if test="deviceFeeWithTax != null">
device_fee_with_tax = #{deviceFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="installServiceFee != null">
install_service_fee = #{installServiceFee,jdbcType=DECIMAL},
</if>
<if test="installServiceFeeWithTax != null">
install_service_fee_with_tax = #{installServiceFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="totalFee != null">
total_fee = #{totalFee,jdbcType=DECIMAL},
</if>
<if test="totalFeeWithTax != null">
total_fee_with_tax = #{totalFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="installFinishTime != null">
install_finish_time = #{installFinishTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="deleteByOrderId">
UPDATE t_settlement_detail
SET is_del = 1
WHERE
order_id = #{orderId,jdbcType=VARCHAR}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetail">
update t_settlement_detail
set settlement_id = #{settlementId,jdbcType=VARCHAR},
order_id = #{orderId,jdbcType=VARCHAR},
user_name = #{userName,jdbcType=VARCHAR},
user_phone = #{userPhone,jdbcType=VARCHAR},
device_fee = #{deviceFee,jdbcType=DECIMAL},
device_fee_with_tax = #{deviceFeeWithTax,jdbcType=DECIMAL},
install_service_fee = #{installServiceFee,jdbcType=DECIMAL},
install_service_fee_with_tax = #{installServiceFeeWithTax,jdbcType=DECIMAL},
total_fee = #{totalFee,jdbcType=DECIMAL},
total_fee_with_tax = #{totalFeeWithTax,jdbcType=DECIMAL},
install_finish_time = #{installFinishTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_settlement_detail
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByOemId" resultMap="BaseResultMap">
select t.*
from t_settlement_detail t
left join t_order o on o.id=t.order_id
where
o.oem_id = #{oemId,jdbcType=INTEGER}
and
t.install_finish_time &gt; #{installFinishStartTime,jdbcType=VARCHAR}
and
t.install_finish_time &lt; #{installFinishEndTime,jdbcType=VARCHAR}
</select>
<select id="selectBySettlementId" resultMap="BaseResultMap">
select t.*
from t_settlement_detail t
where
t.settlement_id=#{settlementId}
</select>
<update id="batchUpdateSettlementId">
update t_settlement_detail
set settlement_id = #{settlementId,jdbcType=VARCHAR}
where id in
<foreach collection="idList" index="index" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SettlementDetailSupplierMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetailSupplier">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="settlement_id" jdbcType="VARCHAR" property="settlementId" />
<result column="order_id" jdbcType="VARCHAR" property="orderId" />
<result column="user_name" jdbcType="VARCHAR" property="userName" />
<result column="user_phone" jdbcType="VARCHAR" property="userPhone" />
<result column="survey_fee" jdbcType="DECIMAL" property="surveyFee" />
<result column="survey_fee_with_tax" jdbcType="DECIMAL" property="surveyFeeWithTax" />
<result column="item_fee" jdbcType="DECIMAL" property="itemFee" />
<result column="item_fee_with_tax" jdbcType="DECIMAL" property="itemFeeWithTax" />
<result column="install_fee" jdbcType="DECIMAL" property="installFee" />
<result column="install_fee_with_tax" jdbcType="DECIMAL" property="installFeeWithTax" />
<result column="expand_fee" jdbcType="DECIMAL" property="expandFee" />
<result column="total_fee" jdbcType="DECIMAL" property="totalFee" />
<result column="total_fee_with_tax" jdbcType="DECIMAL" property="totalFeeWithTax" />
<result column="finish_time" jdbcType="TIMESTAMP" property="finishTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="is_del" jdbcType="INTEGER" property="isDel" />
</resultMap>
<sql id="Base_Column_List">
id, settlement_id, order_id, user_name, user_phone, survey_fee, survey_fee_with_tax,
item_fee, item_fee_with_tax, install_fee, install_fee_with_tax, expand_fee, total_fee,
total_fee_with_tax, finish_time, create_time,is_del
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_settlement_detail_supplier
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetailSupplier">
insert into t_settlement_detail_supplier (id, settlement_id, order_id,
user_name, user_phone, survey_fee,
survey_fee_with_tax, item_fee, item_fee_with_tax,
install_fee, install_fee_with_tax, expand_fee,
total_fee, total_fee_with_tax, finish_time,
create_time)
values (#{id,jdbcType=INTEGER}, #{settlementId,jdbcType=VARCHAR}, #{orderId,jdbcType=VARCHAR},
#{userName,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR}, #{surveyFee,jdbcType=DECIMAL},
#{surveyFeeWithTax,jdbcType=DECIMAL}, #{itemFee,jdbcType=DECIMAL}, #{itemFeeWithTax,jdbcType=DECIMAL},
#{installFee,jdbcType=DECIMAL}, #{installFeeWithTax,jdbcType=DECIMAL}, #{expandFee,jdbcType=DECIMAL},
#{totalFee,jdbcType=DECIMAL}, #{totalFeeWithTax,jdbcType=DECIMAL}, #{finishTime,jdbcType=TIMESTAMP},
#{createTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetailSupplier">
insert into t_settlement_detail_supplier
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="settlementId != null">
settlement_id,
</if>
<if test="orderId != null">
order_id,
</if>
<if test="userName != null">
user_name,
</if>
<if test="userPhone != null">
user_phone,
</if>
<if test="surveyFee != null">
survey_fee,
</if>
<if test="surveyFeeWithTax != null">
survey_fee_with_tax,
</if>
<if test="itemFee != null">
item_fee,
</if>
<if test="itemFeeWithTax != null">
item_fee_with_tax,
</if>
<if test="installFee != null">
install_fee,
</if>
<if test="installFeeWithTax != null">
install_fee_with_tax,
</if>
<if test="expandFee != null">
expand_fee,
</if>
<if test="totalFee != null">
total_fee,
</if>
<if test="totalFeeWithTax != null">
total_fee_with_tax,
</if>
<if test="finishTime != null">
finish_time,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="settlementId != null">
#{settlementId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
#{orderId,jdbcType=VARCHAR},
</if>
<if test="userName != null">
#{userName,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
#{userPhone,jdbcType=VARCHAR},
</if>
<if test="surveyFee != null">
#{surveyFee,jdbcType=DECIMAL},
</if>
<if test="surveyFeeWithTax != null">
#{surveyFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="itemFee != null">
#{itemFee,jdbcType=DECIMAL},
</if>
<if test="itemFeeWithTax != null">
#{itemFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="installFee != null">
#{installFee,jdbcType=DECIMAL},
</if>
<if test="installFeeWithTax != null">
#{installFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="expandFee != null">
#{expandFee,jdbcType=DECIMAL},
</if>
<if test="totalFee != null">
#{totalFee,jdbcType=DECIMAL},
</if>
<if test="totalFeeWithTax != null">
#{totalFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="finishTime != null">
#{finishTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetailSupplier">
update t_settlement_detail_supplier
<set>
<if test="settlementId != null">
settlement_id = #{settlementId,jdbcType=VARCHAR},
</if>
<if test="orderId != null">
order_id = #{orderId,jdbcType=VARCHAR},
</if>
<if test="userName != null">
user_name = #{userName,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
user_phone = #{userPhone,jdbcType=VARCHAR},
</if>
<if test="surveyFee != null">
survey_fee = #{surveyFee,jdbcType=DECIMAL},
</if>
<if test="surveyFeeWithTax != null">
survey_fee_with_tax = #{surveyFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="itemFee != null">
item_fee = #{itemFee,jdbcType=DECIMAL},
</if>
<if test="itemFeeWithTax != null">
item_fee_with_tax = #{itemFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="installFee != null">
install_fee = #{installFee,jdbcType=DECIMAL},
</if>
<if test="installFeeWithTax != null">
install_fee_with_tax = #{installFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="expandFee != null">
expand_fee = #{expandFee,jdbcType=DECIMAL},
</if>
<if test="totalFee != null">
total_fee = #{totalFee,jdbcType=DECIMAL},
</if>
<if test="totalFeeWithTax != null">
total_fee_with_tax = #{totalFeeWithTax,jdbcType=DECIMAL},
</if>
<if test="finishTime != null">
finish_time = #{finishTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.SettlementDetailSupplier">
update t_settlement_detail_supplier
set settlement_id = #{settlementId,jdbcType=VARCHAR},
order_id = #{orderId,jdbcType=VARCHAR},
user_name = #{userName,jdbcType=VARCHAR},
user_phone = #{userPhone,jdbcType=VARCHAR},
survey_fee = #{surveyFee,jdbcType=DECIMAL},
survey_fee_with_tax = #{surveyFeeWithTax,jdbcType=DECIMAL},
item_fee = #{itemFee,jdbcType=DECIMAL},
item_fee_with_tax = #{itemFeeWithTax,jdbcType=DECIMAL},
install_fee = #{installFee,jdbcType=DECIMAL},
install_fee_with_tax = #{installFeeWithTax,jdbcType=DECIMAL},
expand_fee = #{expandFee,jdbcType=DECIMAL},
total_fee = #{totalFee,jdbcType=DECIMAL},
total_fee_with_tax = #{totalFeeWithTax,jdbcType=DECIMAL},
finish_time = #{finishTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_settlement_detail_supplier
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectBySupplierId" resultMap="BaseResultMap">
select t.*
from t_settlement_detail_supplier t
left join t_order o on o.id=t.order_id
where
o.install_supplier_id = #{supplierId,jdbcType=INTEGER}
and
t.finish_time &gt; #{finishStartTime,jdbcType=VARCHAR}
and
t.finish_time &lt; #{finishEndTime,jdbcType=VARCHAR}
</select>
<select id="selectBySettlementId" resultMap="BaseResultMap">
select t.*
from t_settlement_detail_supplier t
where
t.settlement_id=#{settlementId}
</select>
<update id="batchUpdateSettlementId">
update t_settlement_detail_supplier
set settlement_id = #{settlementId,jdbcType=VARCHAR}
where id in
<foreach collection="idList" index="index" item="item" separator="," open="(" close=")">
#{item}
</foreach>
</update>
<update id="deleteByOrderId">
UPDATE t_settlement_detail_supplier
SET is_del = 1
WHERE
order_id = #{orderId,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SettlementMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.settlement.po.Settlement">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="settlement_id" jdbcType="VARCHAR" property="settlementId" />
<result column="start_date" jdbcType="DATE" property="startDate" />
<result column="end_date" jdbcType="DATE" property="endDate" />
<result column="target_id" jdbcType="INTEGER" property="targetId" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="total_price" jdbcType="DECIMAL" property="totalPrice" />
<result column="total_price_with_tax" jdbcType="DECIMAL" property="totalPriceWithTax" />
<result column="total_tax" jdbcType="DECIMAL" property="totalTax" />
<result column="total_price_actual" jdbcType="DECIMAL" property="totalPriceActual" />
<result column="total_tax_actual" jdbcType="DECIMAL" property="totalTaxActual" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="update_account" jdbcType="INTEGER" property="updateAccount" />
<result column="create_account" jdbcType="INTEGER" property="createAccount" />
</resultMap>
<sql id="Base_Column_List">
id, settlement_id, start_date, end_date, target_id, type, total_price, total_price_with_tax,
total_tax, total_price_actual, total_tax_actual, status, remark, create_time, update_time,
update_account, create_account
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_settlement
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.Settlement">
insert into t_settlement (id, settlement_id, start_date,
end_date, target_id, type,
total_price, total_price_with_tax, total_tax,
total_price_actual, total_tax_actual, status,
remark, create_time, update_time,
update_account, create_account)
values (#{id,jdbcType=INTEGER}, #{settlementId,jdbcType=VARCHAR}, #{startDate,jdbcType=DATE},
#{endDate,jdbcType=DATE}, #{targetId,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
#{totalPrice,jdbcType=DECIMAL}, #{totalPriceWithTax,jdbcType=DECIMAL}, #{totalTax,jdbcType=DECIMAL},
#{totalPriceActual,jdbcType=DECIMAL}, #{totalTaxActual,jdbcType=DECIMAL}, #{status,jdbcType=INTEGER},
#{remark,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{updateAccount,jdbcType=INTEGER}, #{createAccount,jdbcType=INTEGER})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.Settlement">
insert into t_settlement
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="settlementId != null">
settlement_id,
</if>
<if test="startDate != null">
start_date,
</if>
<if test="endDate != null">
end_date,
</if>
<if test="targetId != null">
target_id,
</if>
<if test="type != null">
type,
</if>
<if test="totalPrice != null">
total_price,
</if>
<if test="totalPriceWithTax != null">
total_price_with_tax,
</if>
<if test="totalTax != null">
total_tax,
</if>
<if test="totalPriceActual != null">
total_price_actual,
</if>
<if test="totalTaxActual != null">
total_tax_actual,
</if>
<if test="status != null">
status,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="updateAccount != null">
update_account,
</if>
<if test="createAccount != null">
create_account,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="settlementId != null">
#{settlementId,jdbcType=VARCHAR},
</if>
<if test="startDate != null">
#{startDate,jdbcType=DATE},
</if>
<if test="endDate != null">
#{endDate,jdbcType=DATE},
</if>
<if test="targetId != null">
#{targetId,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="totalPrice != null">
#{totalPrice,jdbcType=DECIMAL},
</if>
<if test="totalPriceWithTax != null">
#{totalPriceWithTax,jdbcType=DECIMAL},
</if>
<if test="totalTax != null">
#{totalTax,jdbcType=DECIMAL},
</if>
<if test="totalPriceActual != null">
#{totalPriceActual,jdbcType=DECIMAL},
</if>
<if test="totalTaxActual != null">
#{totalTaxActual,jdbcType=DECIMAL},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateAccount != null">
#{updateAccount,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.Settlement">
update t_settlement
<set>
<if test="settlementId != null">
settlement_id = #{settlementId,jdbcType=VARCHAR},
</if>
<if test="startDate != null">
start_date = #{startDate,jdbcType=DATE},
</if>
<if test="endDate != null">
end_date = #{endDate,jdbcType=DATE},
</if>
<if test="targetId != null">
target_id = #{targetId,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="totalPrice != null">
total_price = #{totalPrice,jdbcType=DECIMAL},
</if>
<if test="totalPriceWithTax != null">
total_price_with_tax = #{totalPriceWithTax,jdbcType=DECIMAL},
</if>
<if test="totalTax != null">
total_tax = #{totalTax,jdbcType=DECIMAL},
</if>
<if test="totalPriceActual != null">
total_price_actual = #{totalPriceActual,jdbcType=DECIMAL},
</if>
<if test="totalTaxActual != null">
total_tax_actual = #{totalTaxActual,jdbcType=DECIMAL},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="updateAccount != null">
update_account = #{updateAccount,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.Settlement">
update t_settlement
set settlement_id = #{settlementId,jdbcType=VARCHAR},
start_date = #{startDate,jdbcType=DATE},
end_date = #{endDate,jdbcType=DATE},
target_id = #{targetId,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
total_price = #{totalPrice,jdbcType=DECIMAL},
total_price_with_tax = #{totalPriceWithTax,jdbcType=DECIMAL},
total_tax = #{totalTax,jdbcType=DECIMAL},
total_price_actual = #{totalPriceActual,jdbcType=DECIMAL},
total_tax_actual = #{totalTaxActual,jdbcType=DECIMAL},
status = #{status,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
update_account = #{updateAccount,jdbcType=INTEGER},
create_account = #{createAccount,jdbcType=INTEGER}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_settlement
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectBySettlementId" parameterType="java.lang.String" resultMap="BaseResultMap">
select *
from t_settlement
where settlement_id = #{settlementId}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.settlement.po.Settlement"
resultType="com.boco.nbd.wios.manage.entity.settlement.vo.SettlementVo">
select t.*,o.name as targetName from t_settlement t
<if test="type==1">
left join t_oem o on o.id = t.target_id
</if>
<if test="type==2">
left join t_supplier o on o.id = t.target_id
</if>
<where>
<if test="settlementId != null and settlementId !=''">
and t.settlement_id = #{settlementId}
</if>
<if test="targetId != null ">
and t.target_id = #{targetId}
</if>
<if test="type != null ">
and t.type = #{type}
</if>
<if test="status != null">
and t.status = #{status}
</if>
</where>
order by t.create_time desc
</select>
<select id="getSettlementByCondition" resultType="com.boco.nbd.wios.manage.entity.settlement.po.Settlement">
SELECT
<include refid="Base_Column_List" />
FROM
t_settlement
WHERE
`status` = 1
<if test="list != null ">
AND target_id IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="type != null ">
AND type = #{type}
</if>
<if test="startDate != null and endDate != null">
AND (
(
start_date &lt;= #{startDate}
AND end_date &gt;= #{startDate}
)
OR (
start_date &lt;= #{endDate}
AND end_date &gt;= #{endDate}
)
OR (
start_date &gt;= #{startDate}
AND end_date &lt;= #{endDate}
)
)
</if>
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.StatisticsMapper">
<!--归档订单总数-->
<select id="selectFiledOrderCount" resultType="java.lang.Integer">
select count(*) from t_order a where a.status=64 and a.type=1 and a.process_ins_id is not null and nodeFlag='199'
<if test="nodeFlag != null ">
and a.node_flag in
<foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
#{nodeFlag}
</foreach>
</if>
<if test="createTime != null and createTime != ''">
<if test="timeType=='day'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m-%d')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m-%d')=#{createTime}
</otherwise>
</choose>
</if>
<if test="timeType=='month'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m')=#{createTime}
</otherwise>
</choose>
</if>
</if>
<if test="oemId != null and oemId != ''">
and a.oem_id=#{oemId}
</if>
<if test="oemId != null and oemId != ''">
and a.oem_id=#{oemId}
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
</select>
<!--流程中订单总数-->
<select id="selectFlowOrderCount" resultType="java.lang.Integer">
select count(*) from t_order a where a.status!=64 and a.type=1 and a.process_ins_id is not null
<if test="nodeFlag != null ">
and a.node_flag in
<foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
#{nodeFlag}
</foreach>
</if>
<if test="createTime != null and createTime != ''">
<if test="timeType=='day'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m-%d')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m-%d')=#{createTime}
</otherwise>
</choose>
</if>
<if test="timeType=='month'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m')=#{createTime}
</otherwise>
</choose>
</if>
</if>
<if test="oemId != null and oemId != ''">
and a.oem_id=#{oemId}
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
</select>
<resultMap id="StatisticsCountMap" type="java.util.HashMap">
<result column="name" property="key" javaType="java.lang.String"/>
<result column="num" property="value" javaType="java.lang.Integer"/>
</resultMap>
<!--根据节点查询订单总数-->
<select id="getFlowOrderCount" resultType="java.lang.Integer">
select count(*)
from t_order
where type=1 and process_ins_id is not null and (node_flag!=199 and status=64)=false
<if test="oemId != null and oemId != ''">
and oem_id=#{oemId}
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="nodeFlag != null ">
and node_flag in
<foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
#{nodeFlag}
</foreach>
</if>
</select>
<!--区域根据节点查询订单总数-->
<select id="getFlowOrderCountGroupArea" resultMap="StatisticsCountMap">
select area_name name,count(*) num
from t_order
where type=1 and process_ins_id is not null and (node_flag!=199 and status=64)=false and area_id in (select id from t_region where parent_id=1)
<if test="oemId != null and oemId != ''">
and oem_id=#{oemId}
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="nodeFlag != null ">
and node_flag in
<foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
#{nodeFlag}
</foreach>
</if>
GROUP BY area_name
</select>
<!--派发订单总数-->
<select id="getOrderCount" resultType="java.lang.Integer">
select count(*)
from t_order
where type=1 and process_ins_id is not null and (node_flag!=199 and status=64)=false
<if test="oemId != null and oemId != ''">
and oem_id=#{oemId}
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
</select>
<!--区域派发订单总数-->
<select id="getOrderCountGroupArea" resultMap="StatisticsCountMap">
select area_name name,count(*) num
from t_order
where type=1 and process_ins_id is not null and (node_flag!=199 and status=64)=false and area_id in (select id from t_region where parent_id=1)
<if test="oemId != null and oemId != ''">
and oem_id=#{oemId}
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
GROUP BY area_name
</select>
<!--省份订单总量-->
<select id="selectProvinceOrderCount" resultType="com.boco.nbd.wios.flow.entity.vo.StatisticsProvinceVo">
select a.province_id,a.province_name as provinceName ,count(*) as orderCount from t_order a where a.type=1 and (a.node_flag!=199 and a.status=64)=false and a.process_ins_id is not null and a.province_name is not null
<if test="nodeFlag != null ">
and a.node_flag in
<foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
#{nodeFlag}
</foreach>
</if>
<if test="createTime != null and createTime != ''">
<if test="timeType=='day'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m-%d')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m-%d')=#{createTime}
</otherwise>
</choose>
</if>
<if test="timeType=='month'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m')=#{createTime}
</otherwise>
</choose>
</if>
</if>
<if test="oemId != null and oemId != ''">
and a.oem_id=#{oemId}
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
GROUP BY a.province_name
</select>
<!--地市订单总量-->
<select id="selectAreaOrderCount" resultType="java.util.HashMap">
<choose>
<when test='provinceId == "20" or provinceId == "42" or provinceId == "25" or provinceId == "31" '>
select a.city_name as regionName ,count(*) as orderCount from t_order a where a.type=1 and (a.node_flag!=199 and a.status=64)=false and a.process_ins_id is not null and a.city_name is not null and a.province_id=#{provinceId}
<if test="nodeFlag != null ">
and a.node_flag in
<foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
#{nodeFlag}
</foreach>
</if>
<if test="createTime != null and createTime != ''">
<if test="timeType=='day'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m-%d')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m-%d')=#{createTime}
</otherwise>
</choose>
</if>
<if test="timeType=='month'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m')=#{createTime}
</otherwise>
</choose>
</if>
</if>
<if test="oemId != null and oemId != ''">
and a.oem_id=#{oemId}
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
GROUP BY a.city_name
</when>
<otherwise>
select a.region_name as regionName ,count(*) as orderCount from t_order a where a.type=1 and (a.node_flag!=199 and a.status=64)=false and a.process_ins_id is not null and a.region_name is not null and a.province_id=#{provinceId}
<if test="nodeFlag != null ">
and a.node_flag in
<foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
#{nodeFlag}
</foreach>
</if>
<if test="createTime != null and createTime != ''">
<if test="timeType=='day'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m-%d')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m-%d')=#{createTime}
</otherwise>
</choose>
</if>
<if test="timeType=='month'">
<choose>
<when test="nodeName != null and nodeName != ''">
and exists (select 1 from ACT_HI_TASKINST b where a.process_ins_id = b.PROC_INST_ID_ and b.NAME_ = #{nodeName} and date_format(b.END_TIME_ ,'%Y-%m')= #{createTime})
</when>
<otherwise>
and DATE_FORMAT(a.create_time,'%Y-%m')=#{createTime}
</otherwise>
</choose>
</if>
</if>
<if test="oemId != null and oemId != ''">
and a.oem_id=#{oemId}
</if>
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
GROUP BY a.region_name
</otherwise>
</choose>
</select>
<!--月度订单统计-->
<select id="selectMonthOrderQuantity" resultType="java.util.HashMap">
select date_format(create_time,'%Y-%m') as time,count(*) as orderCount
FROM t_order
where type=1 and process_ins_id is not null
and date_format(create_time,'%Y-%m')&gt;=#{startTime}
and date_format(create_time,'%Y-%m')&lt;=#{endTime}
<if test="nodeFlag != null ">
and node_flag in
<foreach collection="nodeFlag" item="nodeFlag" open="(" separator="," close=")">
#{nodeFlag}
</foreach>
</if>
<if test="oemId != null and oemId != ''">
and oem_id=#{oemId}
</if>
GROUP BY date_format(create_time,'%Y-%m')
</select>
<!--查询节点信息-->
<select id="getTaskInstByInstIdAndName" resultType="com.boco.nbd.wios.flow.entity.bo.TaskInstBO">
select
ID_ id,PROC_INST_ID_ procInstId,NAME_ name,START_TIME_ startTime,CLAIM_TIME_ claimTime,END_TIME_ endTime,DUE_DATE_ dueDate
from ACT_HI_TASKINST
<where>
<if test="procInstId != null and procInstId != ''">
and PROC_INST_ID_= #{procInstId}
</if>
<if test="nodeName != null and nodeName != ''">
and NAME_ = #{nodeName}
</if>
</where>
order by date_format(START_TIME_,'%Y-%m-%d %H:%i:%s') desc
</select>
<resultMap id="ScoreSupplierMap" type="java.util.HashMap">
<result column="name" property="key" javaType="java.lang.String"/>
<result column="num" property="value" javaType="java.lang.Integer"/>
</resultMap>
<!--根据服务商查询评分-->
<select id="getScoreSupplierBySupplier" resultMap="ScoreSupplierMap">
SELECT
supplier_name name,
FORMAT( AVG( final_score ), 2 ) num
FROM
t_score_supplier_v2
<where>
<if test="time != null and time != ''">
and month = #{time}
</if>
</where>
GROUP BY
supplier_name
</select>
<!--根据区域查询评分-->
<select id="getScoreSupplierByRegion" resultMap="ScoreSupplierMap">
SELECT
region_name name,
FORMAT( AVG( final_score ), 2 ) num
FROM
t_score_supplier_v2
<where>
<if test="time != null and time != ''">
and month = #{time}
</if>
</where>
GROUP BY
region_name
</select>
<!--不满意订单数量统计-->
<select id="getDissatisfiedOrderCount" resultType="java.lang.Integer">
SELECT
SUM( c.num ) num
FROM
(
SELECT
count(*) num
FROM
t_order a
INNER JOIN t_order_score b ON a.id = b.order_id
INNER JOIN ACT_HI_TASKINST d ON a.process_ins_id=d.PROC_INST_ID_
WHERE
a.type = 1
AND a.process_ins_id IS NOT NULL
AND ( a.node_flag != 199 AND a.STATUS = 64 )= FALSE
AND ( a.know_after_sales_channel &lt;&gt; 0 OR a.know_after_sales_channel IS NULL )
AND ( a.visit_content NOT IN ( 'APP', '预约充电', '充电慢', '墙盒功率' ) OR a.visit_content IS NULL )
AND b.NAME = '充电评价'
AND b.score &lt; 60
AND a.node_flag &gt; 112
AND left(d.NAME_,3) = '113'
<if test="time != null and time != ''">
AND DATE_FORMAT(d.START_TIME_,'%Y-%m') = #{time}
</if>
UNION ALL
SELECT
count(*) num
FROM
t_order a
INNER JOIN ACT_HI_TASKINST d ON a.process_ins_id=d.PROC_INST_ID_
WHERE
a.type = 1
AND a.process_ins_id IS NOT NULL
AND ( a.node_flag != 199 AND a.STATUS = 64 )= FALSE
AND a.know_after_sales_channel = 0
AND a.node_flag &gt; 112
AND left(d.NAME_,3) = '113'
<if test="time != null and time != ''">
AND DATE_FORMAT(d.START_TIME_,'%Y-%m') = #{time}
</if>
) c
</select>
<!--安装审核通过数量-->
<select id="getInstallationAuditPassedOrderCount" resultType="java.lang.Integer">
SELECT
count(*)
FROM
t_order a
INNER JOIN ACT_HI_TASKINST d ON a.process_ins_id=d.PROC_INST_ID_
WHERE
a.type = 1
AND a.process_ins_id IS NOT NULL
AND ( a.node_flag != 199 AND a.STATUS = 64 )= FALSE
AND a.node_flag > 112
AND left(d.NAME_,3) = '113'
<if test="time != null and time != ''">
AND DATE_FORMAT(d.START_TIME_,'%Y-%m') = #{time}
</if>
</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.boco.nbd.wios.score.mapper.def.SupplierConfigMapper">
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SupplierContractItemMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.SupplierContractItem">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="contract_id" jdbcType="INTEGER" property="contractId" />
<result column="item_id" jdbcType="VARCHAR" property="itemId" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="rate_price" jdbcType="DECIMAL" property="ratePrice" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, contract_id, item_id, type, price, tax_rate, rate_price, description, create_account,
create_time, modify_account, modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_supplier_contract_item
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractItem">
insert into t_supplier_contract_item (id, contract_id, item_id,
type, price, tax_rate,
rate_price, description, create_account,
create_time, modify_account, modify_time
)
values (#{id,jdbcType=INTEGER}, #{contractId,jdbcType=INTEGER}, #{itemId,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{price,jdbcType=DECIMAL}, #{taxRate,jdbcType=DECIMAL},
#{ratePrice,jdbcType=DECIMAL}, #{description,jdbcType=VARCHAR}, #{createAccount,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractItem">
insert into t_supplier_contract_item
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="contractId != null">
contract_id,
</if>
<if test="itemId != null">
item_id,
</if>
<if test="type != null">
type,
</if>
<if test="price != null">
price,
</if>
<if test="taxRate != null">
tax_rate,
</if>
<if test="ratePrice != null">
rate_price,
</if>
<if test="description != null">
description,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="contractId != null">
#{contractId,jdbcType=INTEGER},
</if>
<if test="itemId != null">
#{itemId,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
<if test="taxRate != null">
#{taxRate,jdbcType=DECIMAL},
</if>
<if test="ratePrice != null">
#{ratePrice,jdbcType=DECIMAL},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractItem">
update t_supplier_contract_item
<set>
<if test="contractId != null">
contract_id = #{contractId,jdbcType=INTEGER},
</if>
<if test="itemId != null">
item_id = #{itemId,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=VARCHAR},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
<if test="taxRate != null">
tax_rate = #{taxRate,jdbcType=DECIMAL},
</if>
<if test="ratePrice != null">
rate_price = #{ratePrice,jdbcType=DECIMAL},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractItem">
update t_supplier_contract_item
set contract_id = #{contractId,jdbcType=INTEGER},
item_id = #{itemId,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
price = #{price,jdbcType=DECIMAL},
tax_rate = #{taxRate,jdbcType=DECIMAL},
rate_price = #{ratePrice,jdbcType=DECIMAL},
description = #{description,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_supplier_contract_item
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByContractId" parameterType="java.lang.Integer" resultType="com.boco.nbd.wios.manage.entity.bo.SupplierContractItemVo">
select t.*
from t_supplier_contract_item t
where t.contract_id = #{contractId,jdbcType=INTEGER}
</select>
<select id="selectPureByContractId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select t.*
from t_supplier_contract_item t
where t.contract_id = #{contractId,jdbcType=INTEGER}
</select>
<select id="selectByItemId" parameterType="java.lang.String" resultMap="BaseResultMap">
select t.*
from t_supplier_contract_item t
where t.item_id = #{itemId}
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_supplier_contract_item (id, contract_id, item_id,
type, price, tax_rate,
rate_price, description, create_account,
create_time, modify_account, modify_time
)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.contractId,jdbcType=INTEGER}, #{item.itemId,jdbcType=VARCHAR},
#{item.type,jdbcType=VARCHAR}, #{item.price,jdbcType=DECIMAL}, #{item.taxRate,jdbcType=DECIMAL},
#{item.ratePrice,jdbcType=DECIMAL}, #{item.description,jdbcType=VARCHAR}, #{item.createAccount,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.modifyAccount,jdbcType=VARCHAR}, #{item.modifyTime,jdbcType=TIMESTAMP}
)
</foreach>
</insert>
<delete id="deleteByContractId" parameterType="java.lang.Integer">
delete from t_supplier_contract_item
where contract_id = #{contractId}
</delete>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SupplierContractMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.SupplierContract">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="code" jdbcType="VARCHAR" property="code" />
<result column="supplier_id" jdbcType="VARCHAR" property="supplierId" />
<result column="region_id" jdbcType="VARCHAR" property="regionId" />
<result column="contact_name" jdbcType="VARCHAR" property="contactName" />
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone" />
<result column="address" jdbcType="VARCHAR" property="address" />
<result column="sign_date" jdbcType="DATE" property="signDate" />
<result column="start_time" jdbcType="DATE" property="startTime" />
<result column="end_time" jdbcType="DATE" property="endTime" />
<result column="settle_interval" jdbcType="INTEGER" property="settleInterval" />
<result column="business_type" jdbcType="INTEGER" property="businessType" />
<result column="location_id" jdbcType="VARCHAR" property="locationId" />
<result column="tax_rate" jdbcType="DECIMAL" property="taxRate" />
<result column="guarantee_period" jdbcType="INTEGER" property="guaranteePeriod" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, code, supplier_id, region_id, contact_name, contact_phone, address, sign_date,
start_time, end_time, settle_interval, business_type, location_id, tax_rate, guarantee_period,
status, description, create_account, create_time, modify_account, modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_supplier_contract
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContract"
useGeneratedKeys="true" keyProperty="id">
insert into t_supplier_contract (id, code, supplier_id,
region_id, contact_name, contact_phone,
address, sign_date, start_time,
end_time, settle_interval, business_type,
location_id, tax_rate, guarantee_period,
status, description, create_account,
create_time, modify_account, modify_time
)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{supplierId,jdbcType=VARCHAR},
#{regionId,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR}, #{contactPhone,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{signDate,jdbcType=DATE}, #{startTime,jdbcType=DATE},
#{endTime,jdbcType=DATE}, #{settleInterval,jdbcType=INTEGER}, #{businessType,jdbcType=INTEGER},
#{locationId,jdbcType=VARCHAR}, #{taxRate,jdbcType=DECIMAL}, #{guaranteePeriod,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR}, #{createAccount,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContract">
insert into t_supplier_contract
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="supplierId != null">
supplier_id,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="contactName != null">
contact_name,
</if>
<if test="contactPhone != null">
contact_phone,
</if>
<if test="address != null">
address,
</if>
<if test="signDate != null">
sign_date,
</if>
<if test="startTime != null">
start_time,
</if>
<if test="endTime != null">
end_time,
</if>
<if test="settleInterval != null">
settle_interval,
</if>
<if test="businessType != null">
business_type,
</if>
<if test="locationId != null">
location_id,
</if>
<if test="taxRate != null">
tax_rate,
</if>
<if test="guaranteePeriod != null">
guarantee_period,
</if>
<if test="status != null">
status,
</if>
<if test="description != null">
description,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="supplierId != null">
#{supplierId,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
#{regionId,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
#{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
#{contactPhone,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="signDate != null">
#{signDate,jdbcType=DATE},
</if>
<if test="startTime != null">
#{startTime,jdbcType=DATE},
</if>
<if test="endTime != null">
#{endTime,jdbcType=DATE},
</if>
<if test="settleInterval != null">
#{settleInterval,jdbcType=INTEGER},
</if>
<if test="businessType != null">
#{businessType,jdbcType=INTEGER},
</if>
<if test="locationId != null">
#{locationId,jdbcType=VARCHAR},
</if>
<if test="taxRate != null">
#{taxRate,jdbcType=DECIMAL},
</if>
<if test="guaranteePeriod != null">
#{guaranteePeriod,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContract">
update t_supplier_contract
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="supplierId != null">
supplier_id = #{supplierId,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
contact_phone = #{contactPhone,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="signDate != null">
sign_date = #{signDate,jdbcType=DATE},
</if>
<if test="startTime != null">
start_time = #{startTime,jdbcType=DATE},
</if>
<if test="endTime != null">
end_time = #{endTime,jdbcType=DATE},
</if>
<if test="settleInterval != null">
settle_interval = #{settleInterval,jdbcType=INTEGER},
</if>
<if test="businessType != null">
business_type = #{businessType,jdbcType=INTEGER},
</if>
<if test="locationId != null">
location_id = #{locationId,jdbcType=VARCHAR},
</if>
<if test="taxRate != null">
tax_rate = #{taxRate,jdbcType=DECIMAL},
</if>
<if test="guaranteePeriod != null">
guarantee_period = #{guaranteePeriod,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContract">
update t_supplier_contract
set code = #{code,jdbcType=VARCHAR},
supplier_id = #{supplierId,jdbcType=VARCHAR},
region_id = #{regionId,jdbcType=VARCHAR},
contact_name = #{contactName,jdbcType=VARCHAR},
contact_phone = #{contactPhone,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
sign_date = #{signDate,jdbcType=DATE},
start_time = #{startTime,jdbcType=DATE},
end_time = #{endTime,jdbcType=DATE},
settle_interval = #{settleInterval,jdbcType=INTEGER},
business_type = #{businessType,jdbcType=INTEGER},
location_id = #{locationId,jdbcType=VARCHAR},
tax_rate = #{taxRate,jdbcType=DECIMAL},
guarantee_period = #{guaranteePeriod,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
description = #{description,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_supplier_contract
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByCode" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_supplier_contract
where code = #{code}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractBo"
resultType="com.boco.nbd.wios.manage.entity.bo.SupplierContractVo">
select tt.*,count(tt.orderId) as orderQuantity from
(
select t.*,s.name as supplierName,
ord.id as orderId
from t_supplier_contract t
left join t_supplier s on s.id=t.supplier_id
left JOIN t_order ord ON t.supplier_id = ord.install_supplier_id
<where>
<if test="supplierId != null and supplierId != ''">
and t.supplier_id = #{supplierId}
</if>
<if test="code != null and code != ''">
<bind name="codeLike" value="'%' + code + '%'"/>
and t.code like #{codeLike}
</if>
<if test="supplierName != null and supplierName != ''">
<bind name="supplierNameLike" value="'%' + supplierName + '%'"/>
and s.name like #{supplierNameLike}
</if>
<if test="status != null">
and t.status = #{status}
</if>
<if test="statusInList != null">
and t.status in
<foreach collection="statusInList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="taxRate != null">
and t.tax_rate = #{taxRate}
</if>
<if test="orderBy != null and orderBy==1">
order by t.create_time desc
</if>
<if test="orderBy != null and orderBy==2">
order by t.end_time desc
</if>
</where>
) as tt
GROUP BY tt.id
order by tt.create_time desc
</select>
<select id="selectByRegionId"
resultType="com.boco.nbd.wios.manage.entity.bo.SupplierContract">
select t.* from t_supplier_contract t
left join t_supplier s on s.id=t.supplier_id
<where>
s.status=1
and t.`status`=2
and
<foreach collection="regionIdList" item="item" index="index" open="(" close=")">
<if test="index>0">
or
</if>
FIND_IN_SET(#{item},t.region_id)
</foreach>
<if test="status != null">
and t.status = #{status}
</if>
<if test="checkStatus != null">
and s.check_status = #{checkStatus}
</if>
</where>
</select>
<select id="selectEffectiveContract" resultType="com.boco.nbd.wios.manage.entity.bo.SupplierContract">
select t.*
from t_supplier_contract t
<where>
<if test="supplierId != null and supplierId != ''">
and t.supplier_id = #{supplierId}
</if>
<if test="regionId != null and regionId != ''">
and FIND_IN_SET(#{regionId}, t.region_id)
</if>
<if test="status != null">
and t.status = #{status}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SupplierContractPackPriceMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.SupplierContractPackPrice">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="contract_id" jdbcType="INTEGER" property="contractId" />
<result column="region_id" jdbcType="INTEGER" property="regionId" />
<result column="oem_id" jdbcType="INTEGER" property="oemId" />
<result column="device_model" jdbcType="VARCHAR" property="deviceModel" />
<result column="cable_length" jdbcType="DOUBLE" property="cableLength" />
<result column="price" jdbcType="DECIMAL" property="price" />
<result column="price_with_tax" jdbcType="DECIMAL" property="priceWithTax" />
<result column="cable_length_two" jdbcType="DOUBLE" property="cableLengthTwo" />
<result column="price_two" jdbcType="DECIMAL" property="priceTwo" />
<result column="price_with_tax_two" jdbcType="DECIMAL" property="priceWithTaxTwo" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, contract_id, region_id, oem_id, device_model, cable_length, price, price_with_tax,
cable_length_two, price_two, price_with_tax_two, remark, create_time, update_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_supplier_contract_pack_price
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPackPrice">
insert into t_supplier_contract_pack_price (id, contract_id, region_id,
oem_id, device_model, cable_length,
price, price_with_tax, cable_length_two,
price_two, price_with_tax_two, remark,
create_time, update_time)
values (#{id,jdbcType=INTEGER}, #{contractId,jdbcType=INTEGER}, #{regionId,jdbcType=INTEGER},
#{oemId,jdbcType=INTEGER}, #{deviceModel,jdbcType=VARCHAR}, #{cableLength,jdbcType=DOUBLE},
#{price,jdbcType=DECIMAL}, #{priceWithTax,jdbcType=DECIMAL}, #{cableLengthTwo,jdbcType=DOUBLE},
#{priceTwo,jdbcType=DECIMAL}, #{priceWithTaxTwo,jdbcType=DECIMAL}, #{remark,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPackPrice">
insert into t_supplier_contract_pack_price
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="contractId != null">
contract_id,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="oemId != null">
oem_id,
</if>
<if test="deviceModel != null">
device_model,
</if>
<if test="cableLength != null">
cable_length,
</if>
<if test="price != null">
price,
</if>
<if test="priceWithTax != null">
price_with_tax,
</if>
<if test="cableLengthTwo != null">
cable_length_two,
</if>
<if test="priceTwo != null">
price_two,
</if>
<if test="priceWithTaxTwo != null">
price_with_tax_two,
</if>
<if test="remark != null">
remark,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="contractId != null">
#{contractId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
#{regionId,jdbcType=INTEGER},
</if>
<if test="oemId != null">
#{oemId,jdbcType=INTEGER},
</if>
<if test="deviceModel != null">
#{deviceModel,jdbcType=VARCHAR},
</if>
<if test="cableLength != null">
#{cableLength,jdbcType=DOUBLE},
</if>
<if test="price != null">
#{price,jdbcType=DECIMAL},
</if>
<if test="priceWithTax != null">
#{priceWithTax,jdbcType=DECIMAL},
</if>
<if test="cableLengthTwo != null">
#{cableLengthTwo,jdbcType=DOUBLE},
</if>
<if test="priceTwo != null">
#{priceTwo,jdbcType=DECIMAL},
</if>
<if test="priceWithTaxTwo != null">
#{priceWithTaxTwo,jdbcType=DECIMAL},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPackPrice">
update t_supplier_contract_pack_price
<set>
<if test="contractId != null">
contract_id = #{contractId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=INTEGER},
</if>
<if test="oemId != null">
oem_id = #{oemId,jdbcType=INTEGER},
</if>
<if test="deviceModel != null">
device_model = #{deviceModel,jdbcType=VARCHAR},
</if>
<if test="cableLength != null">
cable_length = #{cableLength,jdbcType=DOUBLE},
</if>
<if test="price != null">
price = #{price,jdbcType=DECIMAL},
</if>
<if test="priceWithTax != null">
price_with_tax = #{priceWithTax,jdbcType=DECIMAL},
</if>
<if test="cableLengthTwo != null">
cable_length_two = #{cableLengthTwo,jdbcType=DOUBLE},
</if>
<if test="priceTwo != null">
price_two = #{priceTwo,jdbcType=DECIMAL},
</if>
<if test="priceWithTaxTwo != null">
price_with_tax_two = #{priceWithTaxTwo,jdbcType=DECIMAL},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPackPrice">
update t_supplier_contract_pack_price
set contract_id = #{contractId,jdbcType=INTEGER},
region_id = #{regionId,jdbcType=INTEGER},
oem_id = #{oemId,jdbcType=INTEGER},
device_model = #{deviceModel,jdbcType=VARCHAR},
cable_length = #{cableLength,jdbcType=DOUBLE},
price = #{price,jdbcType=DECIMAL},
price_with_tax = #{priceWithTax,jdbcType=DECIMAL},
cable_length_two = #{cableLengthTwo,jdbcType=DOUBLE},
price_two = #{priceTwo,jdbcType=DECIMAL},
price_with_tax_two = #{priceWithTaxTwo,jdbcType=DECIMAL},
remark = #{remark,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_supplier_contract_pack_price
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByContractId" parameterType="java.lang.Integer" resultType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPackPriceVo">
select t.*,o.name as oemName,r.name as regionName,r.id_tree as regionIdTree
from t_supplier_contract_pack_price t
left join t_oem o on o.id=t.oem_id
left join t_region r on r.id=t.region_id
where t.contract_id = #{contractId,jdbcType=INTEGER}
</select>
<select id="selectPureByContractId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select t.*
from t_supplier_contract_pack_price t
where t.contract_id = #{contractId,jdbcType=INTEGER}
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_supplier_contract_pack_price (id, contract_id, region_id,
oem_id, device_model, cable_length,
price, price_with_tax, cable_length_two,
price_two, price_with_tax_two, remark,
create_time, update_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.contractId,jdbcType=INTEGER}, #{item.regionId,jdbcType=INTEGER},
#{item.oemId,jdbcType=INTEGER}, #{item.deviceModel,jdbcType=VARCHAR}, #{item.cableLength,jdbcType=DOUBLE},
#{item.price,jdbcType=DECIMAL}, #{item.priceWithTax,jdbcType=DECIMAL}, #{item.cableLengthTwo,jdbcType=DOUBLE},
#{item.priceTwo,jdbcType=DECIMAL}, #{item.priceWithTaxTwo,jdbcType=DECIMAL}, #{item.remark,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
<delete id="deleteByContractId" parameterType="java.lang.Integer">
delete from t_supplier_contract_pack_price
where contract_id = #{contractId}
</delete>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SupplierContractPriceMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.SupplierContractPrice">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="contract_id" jdbcType="INTEGER" property="contractId" />
<result column="region_id" jdbcType="INTEGER" property="regionId" />
<result column="oem_id" jdbcType="INTEGER" property="oemId" />
<result column="device_model" jdbcType="VARCHAR" property="deviceModel" />
<result column="survey_price" jdbcType="DECIMAL" property="surveyPrice" />
<result column="survey_rate_price" jdbcType="DECIMAL" property="surveyRatePrice" />
<result column="installation_price" jdbcType="DECIMAL" property="installationPrice" />
<result column="installation_rate_price" jdbcType="DECIMAL" property="installationRatePrice" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</resultMap>
<sql id="Base_Column_List">
id, contract_id, region_id, oem_id, device_model, survey_price, survey_rate_price,
installation_price, installation_rate_price, description, create_account, create_time,
modify_account, modify_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_supplier_contract_price
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPrice">
insert into t_supplier_contract_price (id, contract_id, region_id,
oem_id, device_model, survey_price,
survey_rate_price, installation_price, installation_rate_price,
description, create_account, create_time,
modify_account, modify_time)
values (#{id,jdbcType=INTEGER}, #{contractId,jdbcType=INTEGER}, #{regionId,jdbcType=INTEGER},
#{oemId,jdbcType=INTEGER}, #{deviceModel,jdbcType=VARCHAR}, #{surveyPrice,jdbcType=DECIMAL},
#{surveyRatePrice,jdbcType=DECIMAL}, #{installationPrice,jdbcType=DECIMAL}, #{installationRatePrice,jdbcType=DECIMAL},
#{description,jdbcType=VARCHAR}, #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPrice">
insert into t_supplier_contract_price
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="contractId != null">
contract_id,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="oemId != null">
oem_id,
</if>
<if test="deviceModel != null">
device_model,
</if>
<if test="surveyPrice != null">
survey_price,
</if>
<if test="surveyRatePrice != null">
survey_rate_price,
</if>
<if test="installationPrice != null">
installation_price,
</if>
<if test="installationRatePrice != null">
installation_rate_price,
</if>
<if test="description != null">
description,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="contractId != null">
#{contractId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
#{regionId,jdbcType=INTEGER},
</if>
<if test="oemId != null">
#{oemId,jdbcType=INTEGER},
</if>
<if test="deviceModel != null">
#{deviceModel,jdbcType=VARCHAR},
</if>
<if test="surveyPrice != null">
#{surveyPrice,jdbcType=DECIMAL},
</if>
<if test="surveyRatePrice != null">
#{surveyRatePrice,jdbcType=DECIMAL},
</if>
<if test="installationPrice != null">
#{installationPrice,jdbcType=DECIMAL},
</if>
<if test="installationRatePrice != null">
#{installationRatePrice,jdbcType=DECIMAL},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPrice">
update t_supplier_contract_price
<set>
<if test="contractId != null">
contract_id = #{contractId,jdbcType=INTEGER},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=INTEGER},
</if>
<if test="oemId != null">
oem_id = #{oemId,jdbcType=INTEGER},
</if>
<if test="deviceModel != null">
device_model = #{deviceModel,jdbcType=VARCHAR},
</if>
<if test="surveyPrice != null">
survey_price = #{surveyPrice,jdbcType=DECIMAL},
</if>
<if test="surveyRatePrice != null">
survey_rate_price = #{surveyRatePrice,jdbcType=DECIMAL},
</if>
<if test="installationPrice != null">
installation_price = #{installationPrice,jdbcType=DECIMAL},
</if>
<if test="installationRatePrice != null">
installation_rate_price = #{installationRatePrice,jdbcType=DECIMAL},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPrice">
update t_supplier_contract_price
set contract_id = #{contractId,jdbcType=INTEGER},
region_id = #{regionId,jdbcType=INTEGER},
oem_id = #{oemId,jdbcType=INTEGER},
device_model = #{deviceModel,jdbcType=VARCHAR},
survey_price = #{surveyPrice,jdbcType=DECIMAL},
survey_rate_price = #{surveyRatePrice,jdbcType=DECIMAL},
installation_price = #{installationPrice,jdbcType=DECIMAL},
installation_rate_price = #{installationRatePrice,jdbcType=DECIMAL},
description = #{description,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_supplier_contract_price
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByContractId" parameterType="java.lang.Integer" resultType="com.boco.nbd.wios.manage.entity.bo.SupplierContractPriceVo">
select t.*,o.name as oemName,o.code as oemCode,
r.name as regionName,r.id_tree as regionIdTree, a.name packTypeName
from t_supplier_contract_price t
left join t_oem o on o.id=t.oem_id
left join t_region r on r.id=t.region_id
left join t_oem_cascade a on t.pack_type=a.id
where t.contract_id = #{contractId,jdbcType=INTEGER}
</select>
<select id="selectPureByContractId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select t.*
from t_supplier_contract_price t
where t.contract_id = #{contractId,jdbcType=INTEGER}
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_supplier_contract_price (id, contract_id, region_id, pack_type,
oem_id, device_model, survey_price,
survey_rate_price, installation_price, installation_rate_price,
description, create_account, create_time,
modify_account, modify_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.contractId,jdbcType=INTEGER}, #{item.regionId,jdbcType=INTEGER}, #{item.packType,jdbcType=VARCHAR},
#{item.oemId,jdbcType=INTEGER}, #{item.deviceModel,jdbcType=VARCHAR}, #{item.surveyPrice,jdbcType=DECIMAL},
#{item.surveyRatePrice,jdbcType=DECIMAL}, #{item.installationPrice,jdbcType=DECIMAL}, #{item.installationRatePrice,jdbcType=DECIMAL},
#{item.description,jdbcType=VARCHAR}, #{item.createAccount,jdbcType=VARCHAR}, #{item.createTime,jdbcType=TIMESTAMP},
#{item.modifyAccount,jdbcType=VARCHAR}, #{item.modifyTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
<delete id="deleteByContractId" parameterType="java.lang.Integer">
delete from t_supplier_contract_price
where contract_id = #{contractId}
</delete>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SupplierMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Supplier">
<id column="id" jdbcType="INTEGER" property="id"/>
<result column="code" jdbcType="VARCHAR" property="code"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="status" jdbcType="INTEGER" property="status"/>
<result column="organization_code" jdbcType="VARCHAR" property="organizationCode"/>
<result column="contact_name" jdbcType="VARCHAR" property="contactName"/>
<result column="contact_phone" jdbcType="VARCHAR" property="contactPhone"/>
<result column="address" jdbcType="VARCHAR" property="address"/>
<result column="region_id" jdbcType="VARCHAR" property="regionId"/>
<result column="file_id" jdbcType="VARCHAR" property="fileId"/>
<result column="max_order_quantity" jdbcType="INTEGER" property="maxOrderQuantity"/>
<result column="description" jdbcType="VARCHAR" property="description"/>
<result column="account_id" jdbcType="INTEGER" property="accountId"/>
<result column="level" jdbcType="VARCHAR" property="level"/>
<result column="create_account" jdbcType="VARCHAR" property="createAccount"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount"/>
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/>
<result column="check_status" jdbcType="INTEGER" property="checkStatus"/>
<result column="check_remark" jdbcType="VARCHAR" property="checkRemark"/>
<result column="business_license" jdbcType="VARCHAR" property="businessLicense"/>
<result column="install_license" jdbcType="VARCHAR" property="installLicense"/>
<result column="tuv_cert" jdbcType="VARCHAR" property="tuvCert"/>
<result column="install_insurance" jdbcType="VARCHAR" property="installInsurance"/>
<result column="employer_insurance" jdbcType="VARCHAR" property="employerInsurance"/>
</resultMap>
<sql id="Base_Column_List">
id
, code, name, status, organization_code, contact_name, contact_phone, address,
region_id, file_id, max_order_quantity, description, account_id, level, create_account,
create_time, modify_account, modify_time,check_status,check_remark,business_license,
install_license,tuv_cert,install_insurance,employer_insurance
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete
from t_supplier
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Supplier">
insert into t_supplier (id, code, name,
status, organization_code, contact_name,
contact_phone, address, region_id, pack_type, oem_code,
file_id, max_order_quantity, description,
account_id, level, create_account,
create_time, modify_account, modify_time, business_license,
install_license, tuv_cert, install_insurance, employer_insurance)
values (#{id,jdbcType=INTEGER}, #{code,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{organizationCode,jdbcType=VARCHAR}, #{contactName,jdbcType=VARCHAR},
#{contactPhone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, #{regionId,jdbcType=VARCHAR},
#{packType,jdbcType=VARCHAR}, #{oemCode,jdbcType=VARCHAR},
#{fileId,jdbcType=VARCHAR}, #{maxOrderQuantity,jdbcType=INTEGER}, #{description,jdbcType=VARCHAR},
#{accountId,jdbcType=INTEGER}, #{level,jdbcType=VARCHAR}, #{createAccount,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
#{businessLicense,jdbcType=VARCHAR}, #{installLicense,jdbcType=VARCHAR}, #{tuvCert,jdbcType=VARCHAR},
#{installInsurance,jdbcType=VARCHAR}, #{employerInsurance,jdbcType=VARCHAR})
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Supplier">
insert into t_supplier
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="code != null">
code,
</if>
<if test="name != null">
name,
</if>
<if test="status != null">
status,
</if>
<if test="organizationCode != null">
organization_code,
</if>
<if test="contactName != null">
contact_name,
</if>
<if test="contactPhone != null">
contact_phone,
</if>
<if test="address != null">
address,
</if>
<if test="regionId != null">
region_id,
</if>
<if test="fileId != null">
file_id,
</if>
<if test="maxOrderQuantity != null">
max_order_quantity,
</if>
<if test="description != null">
description,
</if>
<if test="accountId != null">
account_id,
</if>
<if test="level != null">
level,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
<if test="businessLicense != null">
business_license,
</if>
<if test="installLicense != null">
install_license,
</if>
<if test="tuvCert != null">
tuv_cert,
</if>
<if test="installInsurance != null">
install_insurance,
</if>
<if test="employerInsurance != null">
employer_insurance,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="code != null">
#{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="organizationCode != null">
#{organizationCode,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
#{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
#{contactPhone,jdbcType=VARCHAR},
</if>
<if test="address != null">
#{address,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
#{regionId,jdbcType=VARCHAR},
</if>
<if test="fileId != null">
#{fileId,jdbcType=VARCHAR},
</if>
<if test="maxOrderQuantity != null">
#{maxOrderQuantity,jdbcType=INTEGER},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="level != null">
#{level,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="businessLicense != null">
#{businessLicense,jdbcType=VARCHAR},
</if>
<if test="installLicense != null">
#{installLicense,jdbcType=VARCHAR},
</if>
<if test="tuvCert != null">
#{tuvCert,jdbcType=VARCHAR},
</if>
<if test="installInsurance != null">
#{installInsurance,jdbcType=VARCHAR},
</if>
<if test="employerInsurance != null">
#{employerInsurance,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.Supplier">
update t_supplier
<set>
<if test="code != null">
code = #{code,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="organizationCode != null">
organization_code = #{organizationCode,jdbcType=VARCHAR},
</if>
<if test="contactName != null">
contact_name = #{contactName,jdbcType=VARCHAR},
</if>
<if test="contactPhone != null">
contact_phone = #{contactPhone,jdbcType=VARCHAR},
</if>
<if test="address != null">
address = #{address,jdbcType=VARCHAR},
</if>
<if test="regionId != null">
region_id = #{regionId,jdbcType=VARCHAR},
</if>
<if test="packType != null">
pack_type = #{packType,jdbcType=VARCHAR},
</if>
<if test="oemCode != null">
oem_code = #{oemCode,jdbcType=VARCHAR},
</if>
<if test="fileId != null">
file_id = #{fileId,jdbcType=VARCHAR},
</if>
<if test="maxOrderQuantity != null">
max_order_quantity = #{maxOrderQuantity,jdbcType=INTEGER},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="accountId != null">
account_id = #{accountId,jdbcType=INTEGER},
</if>
<if test="level != null">
level = #{level,jdbcType=VARCHAR},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="checkStatus != null">
check_status = #{checkStatus,jdbcType=INTEGER},
</if>
<if test="checkRemark != null">
check_remark = #{checkRemark,jdbcType=VARCHAR},
</if>
<if test="businessLicense != null">
business_license = #{businessLicense,jdbcType=VARCHAR},
</if>
<if test="installLicense != null">
install_license = #{installLicense,jdbcType=VARCHAR},
</if>
<if test="tuvCert != null">
tuv_cert = #{tuvCert,jdbcType=VARCHAR},
</if>
<if test="installInsurance != null">
install_insurance = #{installInsurance,jdbcType=VARCHAR},
</if>
<if test="employerInsurance != null">
employer_insurance = #{employerInsurance,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.Supplier">
update t_supplier
set code = #{code,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
organization_code = #{organizationCode,jdbcType=VARCHAR},
contact_name = #{contactName,jdbcType=VARCHAR},
contact_phone = #{contactPhone,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
region_id = #{regionId,jdbcType=VARCHAR},
file_id = #{fileId,jdbcType=VARCHAR},
max_order_quantity = #{maxOrderQuantity,jdbcType=INTEGER},
description = #{description,jdbcType=VARCHAR},
account_id = #{accountId,jdbcType=INTEGER},
level = #{level,jdbcType=VARCHAR},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
business_license = #{businessLicense,jdbcType=VARCHAR},
install_license = #{installLicense,jdbcType=VARCHAR},
tuv_cert = #{tuvCert,jdbcType=VARCHAR},
install_insurance = #{installInsurance,jdbcType=VARCHAR},
employer_insurance = #{employerInsurance,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from t_supplier
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByAccountId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select t.*
from t_supplier t
where t.account_id = #{accountId}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierBo"
resultType="com.boco.nbd.wios.manage.entity.bo.SupplierVo">
<if test="hasContract != null"><!-- 是否签了合同 -->
select tt.* from
(
</if>
select t.*,
<if test="hasContract != null"><!-- 是否签了合同 -->
sc.id as validContractId,
</if>
a.account as accountName from t_supplier t
left join wb_account a on a.id=t.account_id
<if test="hasContract != null"><!-- 是否签了合同 -->
left join t_supplier_contract sc on sc.supplier_id=t.id
<if test="hasContract == 1">
and sc.status=2
</if>
</if>
<where>
<if test="id != null">
and t.id = #{id}
</if>
<if test="ids != null">
and t.id in
<foreach collection="ids" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="status != null">
and t.status = #{status}
</if>
<if test="code != null and code != ''">
<bind name="codeLike" value="'%' + code + '%'"/>
and t.code like #{codeLike}
</if>
<if test="name != null and name != ''">
<bind name="nameLike" value="'%' + name + '%'"/>
and t.name like #{nameLike}
</if>
<if test="organizationCode != null and organizationCode != ''">
<bind name="organizationCodeLike" value="'%' + organizationCode + '%'"/>
and t.organization_code like #{organizationCodeLike}
</if>
<if test="createStartTime != null and createStartTime != ''">
and t.create_time &gt;= #{createStartTime}
</if>
<if test="createEndTime != null and createEndTime != ''">
and t.create_time &lt;= #{createEndTime}
</if>
<if test="checkStatus != null">
and t.check_status = #{checkStatus}
</if>
</where>
order by t.create_time desc
<if test="hasContract != null"><!-- 是否签了合同 -->
) as tt
</if>
<if test="hasContract != null and hasContract==0"><!-- 未签合同 -->
where tt.validContractId is null
group by tt.id
</if>
<if test="hasContract != null and hasContract!=0"><!-- 签了合同 -->
where tt.validContractId is not null
group by tt.id
</if>
</select>
<select id="selectInProcessOrder"
resultType="com.boco.nbd.wios.manage.entity.bo.SupplierVo">
select t.*,count(o.id) as order_quantity from t_supplier t
left join t_order o
on
o.install_supplier_id=t.id
and
o.status not in
<foreach collection="orderStatusNotInList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
<!-- and
date_format(o.create_time,'%Y%m%d')=date_format(now(),'%Y%m%d') -->
where
t.id in
<foreach collection="supplierIdList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
GROUP BY t.id
</select>
<select id="selectOnly" resultType="com.boco.nbd.wios.manage.entity.bo.Supplier">
select * from t_supplier
<where>
<if test="code != null and code !=''">
or code = #{code}
</if>
<if test="name != null and name != ''">
or name = #{name}
</if>
</where>
</select>
<select id="selectAll" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select *
from t_supplier
where status = #{status,jdbcType=INTEGER}
</select>
<select id="selectByRegionId" resultMap="BaseResultMap">
select *
from t_supplier
where status = 1
<if test="regionId != null and regionId !=''">
and region_id like '%${regionId}%'
</if>
</select>
<select id="selectByLevel" resultMap="BaseResultMap">
select *
from t_supplier
where status = 1
<if test="level != null and level !=''">
and level = #{level}
</if>
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_supplier (id, code, name,
status, organization_code, contact_name,
contact_phone, address, region_id,
file_id, max_order_quantity, description,
account_id, level, create_account,
create_time, modify_account, modify_time
)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.code,jdbcType=VARCHAR}, #{item.name,jdbcType=VARCHAR},
#{item.status,jdbcType=INTEGER}, #{item.organizationCode,jdbcType=VARCHAR},
#{item.contactName,jdbcType=VARCHAR},
#{item.contactPhone,jdbcType=VARCHAR}, #{item.address,jdbcType=VARCHAR}, #{item.regionId,jdbcType=VARCHAR},
#{item.fileId,jdbcType=VARCHAR}, #{item.maxOrderQuantity,jdbcType=INTEGER},
#{item.description,jdbcType=VARCHAR},
#{item.accountId,jdbcType=INTEGER}, #{item.level,jdbcType=VARCHAR}, #{item.createAccount,jdbcType=VARCHAR},
#{item.createTime,jdbcType=TIMESTAMP}, #{item.modifyAccount,jdbcType=VARCHAR},
#{item.modifyTime,jdbcType=TIMESTAMP}
)
</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.boco.nbd.wios.manage.mapper.def.SupplierStaffMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.SupplierStaff">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="supplier_id" jdbcType="INTEGER" property="supplierId" />
<result column="phone" jdbcType="VARCHAR" property="phone" />
<result column="cert_level" jdbcType="INTEGER" property="certLevel" />
<result column="cert_expire" jdbcType="DATE" property="certExpire" />
<result column="is_insure" jdbcType="INTEGER" property="isInsure" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="data_auth" jdbcType="INTEGER" property="dataAuth" />
<result column="cert_files" jdbcType="VARCHAR" property="certFiles" />
<result column="account_id" jdbcType="INTEGER" property="accountId" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
<result column="insure_files" jdbcType="VARCHAR" property="insureFiles" />
<result column="idcard_files" jdbcType="VARCHAR" property="idcardFiles" />
</resultMap>
<sql id="Base_Column_List">
id, name, supplier_id, phone, cert_level, cert_expire, is_insure, status, data_auth,
cert_files, account_id, create_account, create_time, modify_account, modify_time,
insure_files,idcard_files
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_supplier_staff
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierStaff">
insert into t_supplier_staff (id, name, supplier_id,
phone, cert_level, cert_expire,
is_insure, status, data_auth,
cert_files, account_id, create_account,
create_time, modify_account, modify_time,insure_files,idcard_files
)
values (#{id,jdbcType=INTEGER}, #{name,jdbcType=VARCHAR}, #{supplierId,jdbcType=INTEGER},
#{phone,jdbcType=VARCHAR}, #{certLevel,jdbcType=INTEGER}, #{certExpire,jdbcType=DATE},
#{isInsure,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{dataAuth,jdbcType=INTEGER},
#{certFiles,jdbcType=VARCHAR}, #{accountId,jdbcType=INTEGER}, #{createAccount,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
#{insureFiles,jdbcType=VARCHAR},#{idcardFiles,jdbcType=VARCHAR}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierStaff">
insert into t_supplier_staff
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="supplierId != null">
supplier_id,
</if>
<if test="phone != null">
phone,
</if>
<if test="certLevel != null">
cert_level,
</if>
<if test="certExpire != null">
cert_expire,
</if>
<if test="isInsure != null">
is_insure,
</if>
<if test="status != null">
status,
</if>
<if test="dataAuth != null">
data_auth,
</if>
<if test="certFiles != null">
cert_files,
</if>
<if test="accountId != null">
account_id,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
<if test="insureFiles != null">
insure_files,
</if>
<if test="idcardFiles != null">
idcard_files,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="supplierId != null">
#{supplierId,jdbcType=INTEGER},
</if>
<if test="phone != null">
#{phone,jdbcType=VARCHAR},
</if>
<if test="certLevel != null">
#{certLevel,jdbcType=INTEGER},
</if>
<if test="certExpire != null">
#{certExpire,jdbcType=DATE},
</if>
<if test="isInsure != null">
#{isInsure,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="dataAuth != null">
#{dataAuth,jdbcType=INTEGER},
</if>
<if test="certFiles != null">
#{certFiles,jdbcType=VARCHAR},
</if>
<if test="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="insureFiles != null">
#{insureFiles,jdbcType=VARCHAR},
</if>
<if test="idcardFiles != null">
#{idcardFiles,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierStaff">
update t_supplier_staff
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="supplierId != null">
supplier_id = #{supplierId,jdbcType=INTEGER},
</if>
<if test="phone != null">
phone = #{phone,jdbcType=VARCHAR},
</if>
<if test="certLevel != null">
cert_level = #{certLevel,jdbcType=INTEGER},
</if>
<if test="certExpire != null">
cert_expire = #{certExpire,jdbcType=DATE},
</if>
<if test="isInsure != null">
is_insure = #{isInsure,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="dataAuth != null">
data_auth = #{dataAuth,jdbcType=INTEGER},
</if>
<if test="certFiles != null">
cert_files = #{certFiles,jdbcType=VARCHAR},
</if>
<if test="accountId != null">
account_id = #{accountId,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="insureFiles != null">
insure_files = #{insureFiles,jdbcType=VARCHAR},
</if>
<if test="idcardFiles != null">
idcard_files = #{idcardFiles,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierStaff">
update t_supplier_staff
set name = #{name,jdbcType=VARCHAR},
supplier_id = #{supplierId,jdbcType=INTEGER},
phone = #{phone,jdbcType=VARCHAR},
cert_level = #{certLevel,jdbcType=INTEGER},
cert_expire = #{certExpire,jdbcType=DATE},
is_insure = #{isInsure,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
data_auth = #{dataAuth,jdbcType=INTEGER},
cert_files = #{certFiles,jdbcType=VARCHAR},
account_id = #{accountId,jdbcType=INTEGER},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
insure_files = #{insureFiles,jdbcType=VARCHAR},
idcard_files = #{idcardFiles,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_supplier_staff
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByAccountId" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_supplier_staff
where account_id = #{accountId,jdbcType=INTEGER}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.SupplierStaffBo"
resultType="com.boco.nbd.wios.manage.entity.bo.SupplierStaffVo">
select t.*,wr.name as roleName,wr.id as roleId,wa.account as loginAccount,s.name as supplierName from t_supplier_staff t
left join wb_account_role war on t.account_id=war.account_id
left join wb_role wr on war.role_id=wr.id
left join wb_account wa on t.account_id=wa.id
left join t_supplier s on t.supplier_id=s.id
<where>
<if test="id != null">
and t.id = #{id}
</if>
<if test="name != null and name != ''">
<bind name="nameLike" value="'%' + name + '%'"/>
and t.name like #{nameLike}
</if>
<if test="account != null and account != ''">
and wa.account = #{account}
</if>
<if test="supplierId != null and supplierId != ''">
and t.supplier_id = #{supplierId}
</if>
<if test="showCertExpired != null and showCertExpired == 0">
and t.cert_expire &gt;= now()
</if>
</where>
order by t.create_time desc
</select>
<select id="selectAll" resultType="com.boco.nbd.wios.manage.entity.bo.SupplierStaffVo">
select * from t_supplier_staff
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.score.mapper.def.SupplierUserConfigMapper">
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.log.mapper.def.SysLogMapper">
<resultMap id="SysLog"
type="com.boco.nbd.wios.log.entity.po.SysLogPO">
<result column="module_id" property="moduleId" />
<result column="bussiness_name" property="bussinessName" />
<result column="use_time" property="useTime" />
<result column="logcontent" property="logcontent" />
<result column="region_id" property="regionId" />
<result column="user_id" property="userId" />
<result column="log_id" property="logId" />
<result column="user_name" property="userName" />
<result column="handle_consuming_time" property="handleConsumingTime" />
<result column="ip_address" property="ipAddress" />
<result column="service_name" property="serviceName" />
<result column="service_ip" property="serviceIp" />
</resultMap>
<sql id="Base_Column_List">
module_id,
bussiness_name,
use_time,
logcontent,
region_id,
user_id,
log_id,
user_name,
handle_consuming_time,
ip_address,
service_name,
service_ip
</sql>
<!-- 新增一条实体 -->
<insert id="insert" parameterType="com.boco.nbd.wios.log.entity.qo.SysLogQO">
INSERT INTO tv3_sys_log
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="moduleId != null">
module_id ,
</if>
<if test="bussinessName != null">
bussiness_name ,
</if>
<if test="useTime != null">
use_time ,
</if>
<if test="logcontent != null">
logcontent ,
</if>
<if test="regionId != null">
region_id ,
</if>
<if test="userId != null">
user_id ,
</if>
<if test="logId != null">
log_id ,
</if>
<if test="userName != null">
user_name ,
</if>
<if test="handleConsumingTime != null">
handle_consuming_time ,
</if>
<if test="ipAddress != null">
ip_address ,
</if>
<if test="serviceName != null">
service_name ,
</if>
<if test="serviceIp != null">
service_ip
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="moduleId != null">
#{moduleId},
</if>
<if test="bussinessName != null">
#{bussinessName},
</if>
<if test="useTime != null">
DATE_FORMAT(#{useTime}, '%Y-%m-%d %H:%i:%S'),
</if>
<if test="logcontent != null">
#{logcontent},
</if>
<if test="regionId != null">
#{regionId},
</if>
<if test="userId != null">
#{userId},
</if>
<if test="logId != null">
#{logId},
</if>
<if test="userName != null">
#{userName},
</if>
<if test="handleConsumingTime != null">
#{handleConsumingTime},
</if>
<if test="ipAddress != null">
#{ipAddress},
</if>
<if test="serviceName != null">
#{serviceName},
</if>
<if test="serviceIp != null">
#{serviceIp}
</if>
</trim>
</insert>
<!-- ############################################登录日志统计############################################ -->
<!-- 关联了用户模块地市的日志信息详情 -->
<resultMap id="SysLogInfo"
type="com.boco.nbd.wios.log.entity.po.SysLogInfoPO">
<result column="module_id" property="moduleId" />
<result column="bussiness_name" property="bussinessName" />
<result column="use_time" property="useTime" />
<result column="logcontent" property="logcontent" />
<result column="user_id" property="userId" />
<result column="log_id" property="logId" />
<result column="user_name" property="userName" />
<result column="handle_consuming_time" property="handleConsumingTime" />
<result column="ip_address" property="ipAddress" />
<result column="service_name" property="serviceName" />
<result column="service_ip" property="serviceIp" />
<result column="display_name" property="displayName" />
<result column="parent_id" property="parentId" />
<result column="role_id" property="roleId" />
<result column="parent_role_id" property="parentRoleId" />
<result column="parent_user_name" property="parentUserName" />
</resultMap>
<sql id="Include_Login_Where">
and date_format(USE_TIME,<include refid="framework.framework-datestr" />)
between #{start} and #{end}
AND upper(bussiness_name) IN
(UPPER('login'),UPPER('logout'))
</sql>
<sql id="login_counts">
SUM(CASE WHEN upper(bussiness_name) = UPPER('login') THEN 1 ELSE 0 END ) AS login_Counts,
SUM(CASE WHEN upper(bussiness_name) = UPPER('logout') THEN 1 ELSE 0 END ) AS logout_Counts
</sql>
<resultMap id="UsersLoginStat"
type="com.boco.nbd.wios.log.entity.po.UserLogCountInfoPO">
<result column="indexs" property="indexs" />
<result column="id" property="userId" />
<result column="role_id" property="roleId" />
<result column="account" property="userName" />
<result column="name" property="displayName" />
<result column="login_Counts" property="loginCounts" />
<result column="logout_Counts" property="logoutCounts" />
</resultMap>
<!-- 统计用户级别登录日志 -->
<select id="getUsersLoginStat" parameterType="java.lang.String"
resultMap="UsersLoginStat">
select d.* ,
-999 as indexs
from(
select
a.id,
c.role_id,
a.account,
a.name,
IFNULL(login_Counts,0) as login_Counts,
IFNULL(logout_Counts,0) as logout_Counts
from
wb_account a inner join
(
select tv3_sys_log.user_id,
<include refid="login_counts" />
from tv3_sys_log
where 1 = 1
<include refid="Include_Login_Where" />
group by tv3_sys_log.user_id
) b
on a.id=b.user_id
INNER JOIN wb_account_role c on a.id=c.account_id
) d
order by login_counts desc
</select>
<!-- 查询用户的登录日志详细信息 -->
<select id="getUsersLoginDetails" resultMap="SysLogInfo">
select a.*,b.name display_name,a.module_id module_name,b.parent_id,c.role_id parent_role_id,d.role_id,e.account parent_user_name
from
(
select * from tv3_sys_log
where 1=1
<if test="userId != null and userId != ''">
and user_id = #{userId}
</if>
<include refid="Include_Login_Where" />
order by use_time desc
) a
LEFT JOIN wb_account b ON a.user_id = b.id
left join wb_account_role c on c.account_id = b.parent_id
left join wb_account_role d on d.account_id = b.id
left join wb_account e on b.parent_id = e.id
ORDER BY USE_TIME DESC
</select>
<resultMap id="RolesLoginStat"
type="com.boco.nbd.wios.log.entity.po.RoleLogCountInfoPO">
<result column="indexs" property="indexs" />
<result column="role_id" property="roleId" />
<result column="role_name" property="roleName" />
<result column="login_Counts" property="loginCounts" />
<result column="logout_Counts" property="logoutCounts" />
</resultMap>
<!-- 根据时间角色统计日志 -->
<select id="getRolesLoginStat" parameterType="java.lang.String"
resultMap="RolesLoginStat">
SELECT
g.*,
- 999 AS indexs
FROM
(
SELECT
e.name role_name,
sum(IFNULL( login_Counts, 0 )) AS login_Counts,
sum(IFNULL( logout_Counts, 0 )) AS logout_Counts
FROM
wb_role e
LEFT JOIN (
SELECT
c.role_id,
<include refid="login_counts" />
FROM
wb_account_role c,
(
SELECT
a.id user_id,
b.BUSSINESS_NAME,
b.use_time
FROM
wb_account a,
tv3_sys_log b
WHERE
a.id = b.user_id
<include refid="Include_Login_Where" />
) d
WHERE
c.account_id = d.user_id
GROUP BY
c.role_id
) f ON e.id = f.role_id
GROUP BY
e.name
) g
ORDER BY
login_counts DESC
</select>
<!-- 查询角色的登录日志详细信息 -->
<select id="getRolesLoginDetails" parameterType="java.lang.String"
resultMap="SysLogInfo">
select
a.*,b.name display_name,a.module_id module_name,b.parent_id,c.role_id parent_role_id,d.role_id,w.account parent_user_name
from
(
select e.* from
(
SELECT * FROM
tv3_sys_log
WHERE 1 = 1
<include refid="Include_Login_Where" />
order by use_time desc
) e join
(
select account_id
from wb_account_role g left join wb_role h on g.role_id=h.id
where 1=1
<if test="roleName != null and roleName != ''">
and h.name = #{roleName}
</if>
) f on e.user_id=f.account_id
) a
left join wb_account b on a.user_id=b.id
left join wb_account_role c on c.account_id = b.parent_id
left join wb_account_role d on d.account_id = b.id
left join wb_account w on b.parent_id = w.id
ORDER BY USE_TIME DESC
</select>
<!-- ######################统计信息和从统计信息钻取详情##################### -->
<sql id="Exclude_Login_Where">
and date_format(USE_TIME,<include refid="framework.framework-datestr" />)
between #{start} and #{end}
AND upper(bussiness_name) NOT IN
(UPPER('login'),UPPER('logout'))
</sql>
<resultMap id="UserLogCountInfoPO"
type="com.boco.nbd.wios.log.entity.po.UserLogCountInfoPO">
<result column="indexs" property="indexs" />
<result column="id" property="userId" />
<result column="account" property="userName" />
<result column="name" property="displayName" />
<result column="counts" property="counts" />
</resultMap>
<!-- 根据时间用户统计日志-->
<select id="countByUserDate" parameterType="java.lang.String"
resultMap="UserLogCountInfoPO">
select c.* ,
-999 indexs
from(
select
a.id,a.account,a.name,
IFNULL(b.counts,0) as counts
from
wb_account a inner join
(
select tv3_sys_log.user_id,count(0) as counts
from tv3_sys_log
where 1 = 1
<include refid="Exclude_Login_Where" />
group by tv3_sys_log.user_id
) b
on a.id=b.user_id
) c
order by counts desc
</select>
<!-- 根据用户ID查询访问日志详细信息 -->
<select id="selectLogInfoByUserIdDate" resultMap="SysLogInfo">
select a.*,b.name display_name,a.module_id module_name,b.parent_id,c.role_id parent_role_id,d.role_id,e.account parent_user_name
from
(
select * from tv3_sys_log
where 1=1
<if test="userId != null and userId != ''">
and user_id = #{userId}
</if>
<include refid="Exclude_Login_Where" />
order by use_time desc
) a
LEFT JOIN wb_account b ON a.user_id = b.id
left join wb_account_role c on c.account_id = b.parent_id
left join wb_account_role d on d.account_id = b.id
left join wb_account e on b.parent_id = e.id
ORDER BY USE_TIME DESC
</select>
<resultMap id="RoleLogCountInfoPO"
type="com.boco.nbd.wios.log.entity.po.RoleLogCountInfoPO">
<result column="indexs" property="indexs" />
<result column="role_id" property="roleId" />
<result column="role_name" property="roleName" />
<result column="counts" property="counts" />
</resultMap>
<!-- 根据时间角色统计日志 -->
<select id="countByRoleDate" parameterType="java.lang.String"
resultMap="RoleLogCountInfoPO">
SELECT
g.*,
- 999 AS indexs
FROM
(
SELECT
e.name role_name,
sum(IFNULL(f.counts,0)) AS counts
FROM
wb_role e
LEFT JOIN (
SELECT
c.role_id,
count(*)as counts
FROM
wb_account_role c,
(
SELECT
a.id user_id,
b.BUSSINESS_NAME,
b.use_time
FROM
wb_account a,
tv3_sys_log b
WHERE
a.id = b.user_id
<include refid="Exclude_Login_Where" />
) d
WHERE
c.account_id = d.user_id
GROUP BY
c.role_id
) f ON e.id = f.role_id
GROUP BY
e.name
) g
ORDER BY
counts desc
</select>
<!-- 根据角色查询访问日志 -->
<select id="selectByRoleDate" parameterType="java.lang.String"
resultMap="SysLogInfo">
select
a.*,b.name display_name,a.module_id module_name,b.parent_id,c.role_id parent_role_id,d.role_id,w.account parent_user_name
from
(
select e.* from
(
SELECT * FROM
tv3_sys_log
WHERE 1 = 1
<include refid="Exclude_Login_Where" />
order by use_time desc
) e join
(
select account_id
from wb_account_role g left join wb_role h on g.role_id=h.id
where 1=1
<if test="roleName != null and roleName != ''">
and h.name = #{roleName}
</if>
) f on e.user_id=f.account_id
) a
left join wb_account b on a.user_id=b.id
left join wb_account_role c on c.account_id = b.parent_id
left join wb_account_role d on d.account_id = b.id
left join wb_account w on b.parent_id = w.id
ORDER BY USE_TIME DESC
</select>
<!-- ###################模块访问日志统计分割线######################### */-->
<resultMap id="ModuleLogCountInfoPO"
type="com.boco.nbd.wios.log.entity.po.ModuleLogCountInfoPO">
<result column="indexs" property="indexs" />
<result column="module_id" property="moduleId" />
<result column="module_name" property="moduleName" />
<result column="counts" property="counts" />
</resultMap>
<!-- 根据时间模块统计日志 -->
<select id="countByModuleDate"
resultMap="ModuleLogCountInfoPO">
select g.* ,
-999 as indexs
from(
select module_id,module_id module_name,count(0) as counts
from tv3_sys_log
where 1 = 1
<include refid="Exclude_Login_Where" />
group by module_id
) g
order by counts desc
</select>
<!-- 根据模块ID查询日志详细信息 -->
<select id="selectLogInfoByModuleIdDate" resultMap="SysLogInfo">
select a.*,b.name display_name,a.module_id module_name,b.parent_id,c.role_id parent_role_id,d.role_id,w.account parent_user_name
from
(
select * from
tv3_sys_log where 1=1
<if test="moduleId != null and moduleId != ''">
and module_id = #{moduleId}
</if>
<include refid="Exclude_Login_Where" />
order by use_time desc
) a
left join wb_account b on a.user_id=b.id
left join wb_account_role c on c.account_id = b.parent_id
left join wb_account_role d on d.account_id = b.id
left join wb_account w on b.parent_id = w.id
ORDER BY USE_TIME DESC
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SystemInfoDeleteMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.SystemInfoDelete" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="title" property="title" jdbcType="VARCHAR" />
<result column="content" property="content" jdbcType="VARCHAR" />
<result column="third_party_id" property="thirdPartyId" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="BIT" />
<result column="type" property="type" jdbcType="BIT" />
<result column="account_id" property="accountId" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
<result column="order_status" property="orderStatus" jdbcType="INTEGER" />
<result column="overtime_flag" property="overtimeFlag" jdbcType="INTEGER" />
</resultMap>
<sql id="Base_Column_List" >
id, title, content, third_party_id, status, type, account_id, create_time, update_time,
order_status, overtime_flag
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemInfoDelete" >
insert into t_system_info_delete (id, title, content,
third_party_id, status, type,
account_id, create_time, update_time,
order_status, overtime_flag)
values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
#{thirdPartyId,jdbcType=VARCHAR}, #{status,jdbcType=BIT}, #{type,jdbcType=BIT},
#{accountId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{orderStatus,jdbcType=INTEGER}, #{overtimeFlag,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemInfoDelete" >
insert into t_system_info_delete
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="title != null" >
title,
</if>
<if test="content != null" >
content,
</if>
<if test="thirdPartyId != null" >
third_party_id,
</if>
<if test="status != null" >
status,
</if>
<if test="type != null" >
type,
</if>
<if test="accountId != null" >
account_id,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="updateTime != null" >
update_time,
</if>
<if test="orderStatus != null" >
order_status,
</if>
<if test="overtimeFlag != null" >
overtime_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="title != null" >
#{title,jdbcType=VARCHAR},
</if>
<if test="content != null" >
#{content,jdbcType=VARCHAR},
</if>
<if test="thirdPartyId != null" >
#{thirdPartyId,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=BIT},
</if>
<if test="type != null" >
#{type,jdbcType=BIT},
</if>
<if test="accountId != null" >
#{accountId,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="orderStatus != null" >
#{orderStatus,jdbcType=INTEGER},
</if>
<if test="overtimeFlag != null" >
#{overtimeFlag,jdbcType=INTEGER},
</if>
</trim>
</insert>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_system_info_delete ( title, content,
third_party_id, status, type,
account_id, create_time, update_time,
order_status, overtime_flag)
values
<foreach collection="list" item="item" separator=",">
( #{item.title,jdbcType=VARCHAR}, #{item.content,jdbcType=VARCHAR},
#{item.thirdPartyId,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER}, #{item.type,jdbcType=INTEGER},
#{item.accountId,jdbcType=INTEGER}, #{item.createTime,jdbcType=TIMESTAMP}, #{item.updateTime,jdbcType=TIMESTAMP},
#{item.orderStatus,jdbcType=INTEGER}, #{item.overtimeFlag,jdbcType=INTEGER})
</foreach>
</insert>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.SystemInfoMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.SystemInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="third_party_id" jdbcType="VARCHAR" property="thirdPartyId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="account_id" jdbcType="INTEGER" property="accountId" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
id, title, content, third_party_id, status, type, account_id, create_time, update_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_system_info
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByOrderId">
delete from t_system_info where third_party_id = #{orderId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemInfo">
insert into t_system_info (id, title, content,
third_party_id, status, type,
account_id, create_time, update_time,order_status,overtime_flag
)
values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR},
#{thirdPartyId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{type,jdbcType=INTEGER},
#{accountId,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{orderStatus,jdbcType=INTEGER}, #{overtimeFlag,jdbcType=INTEGER}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemInfo">
insert into t_system_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="title != null">
title,
</if>
<if test="content != null">
content,
</if>
<if test="thirdPartyId != null">
third_party_id,
</if>
<if test="status != null">
status,
</if>
<if test="type != null">
type,
</if>
<if test="accountId != null">
account_id,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="title != null">
#{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
#{content,jdbcType=VARCHAR},
</if>
<if test="thirdPartyId != null">
#{thirdPartyId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="accountId != null">
#{accountId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemInfo">
update t_system_info
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="thirdPartyId != null">
third_party_id = #{thirdPartyId,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="accountId != null">
account_id = #{accountId,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemInfo">
update t_system_info
set title = #{title,jdbcType=VARCHAR},
content = #{content,jdbcType=VARCHAR},
third_party_id = #{thirdPartyId,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
type = #{type,jdbcType=INTEGER},
account_id = #{accountId,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_system_info
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemInfo"
resultType="com.boco.nbd.wios.manage.entity.bo.SystemInfo">
select t.* from t_system_info t
<where>
t.type=0
<if test="accountId != null">
and t.account_id = #{accountId}
</if>
<if test="status != null">
and t.status = #{status}
</if>
</where>
order by t.create_time desc
</select>
<select id="selectUnreadQuantity" resultType="java.lang.Integer">
select count(*)
from t_system_info
where account_id = #{accountId} and status=0 and type=0
</select>
<select id="getOrderInOverTime" resultType="com.boco.nbd.wios.manage.entity.bo.SystemInfo">
SELECT
third_party_id,order_status
FROM
t_system_info
WHERE
overtime_flag > 0 and account_id = 0
</select>
<select id="selectListByOrderId" resultType="com.boco.nbd.wios.manage.entity.bo.SystemInfo">
select
<include refid="Base_Column_List" />
from t_system_info
where third_party_id = #{orderId,jdbcType=VARCHAR}
</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.boco.nbd.wios.manage.mapper.def.SystemNoticeMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.SystemNotice">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
<result column="publish_time" jdbcType="TIMESTAMP" property="publishTime" />
<result column="notice_annex" jdbcType="VARCHAR" property="noticeAnnex" />
<result column="file_annex" jdbcType="VARCHAR" property="fileAnnex" />
<result column="display_from" jdbcType="TIMESTAMP" property="displayFrom" />
<result column="display_end" jdbcType="TIMESTAMP" property="displayEnd" />
</resultMap>
<sql id="Base_Column_List">
tsn.id,
tsn.title,
tsn.type,
tsn.content,
tsn.status,
tsn.create_account,
tsn.create_time,
tsn.modify_account,
tsn.modify_time,
tsn.publish_time,
tsn.notice_annex,
tsn.file_annex,
tsn.display_from,
tsn.display_end
</sql>
<sql id="Base_Column_ForList">
tsn.id,
tsn.title,
tsn.type,
tsn.status,
tsn.create_account,
tsn.create_time,
tsn.modify_account,
tsn.modify_time,
tsn.publish_time,
tsn.notice_annex,
tsn.file_annex,
tsn.display_from,
tsn.display_end
</sql>
<delete id="delete" parameterType="java.lang.String">
delete from t_system_notice
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemNotice">
insert into t_system_notice (id, title, type,
content, status, create_account,
create_time, modify_account, modify_time,
publish_time, notice_annex, file_annex,
display_from, display_end)
values (#{id,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER},
#{content,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createAccount,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
#{publishTime,jdbcType=TIMESTAMP}, #{noticeAnnex,jdbcType=VARCHAR}, #{fileAnnex,jdbcType=VARCHAR},
#{displayFrom,jdbcType=TIMESTAMP}, #{displayEnd,jdbcType=TIMESTAMP})
</insert>
<update id="updateNotice" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemNoticeBo">
update t_system_notice
<set>
<if test="title != null">
title = #{title,jdbcType=VARCHAR},
</if>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="content != null">
content = #{content,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="publishTime != null">
publish_time = #{publishTime,jdbcType=TIMESTAMP},
</if>
<if test="noticeAnnex != null">
notice_annex = #{noticeAnnex,jdbcType=VARCHAR},
</if>
<if test="fileAnnex != null">
file_annex = #{fileAnnex,jdbcType=VARCHAR},
</if>
<if test="displayFrom != null">
display_from = #{displayFrom,jdbcType=TIMESTAMP},
</if>
<if test="displayEnd != null">
display_end = #{displayEnd,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_system_notice tsn
where tsn.id = #{id,jdbcType=INTEGER}
</select>
<select id="getList" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemNoticeBo" resultType="com.boco.nbd.wios.manage.entity.bo.SystemNoticeVo">
select
<include refid="Base_Column_ForList" />
from t_system_notice tsn
<include refid="findPageWithWhere" />
order by tsn.modify_time desc
</select>
<select id="getDetail" parameterType="com.boco.nbd.wios.manage.entity.bo.SystemNoticeBo" resultType="com.boco.nbd.wios.manage.entity.bo.SystemNoticeVo">
select
<include refid="Base_Column_List" />
,tu1.name createAccountName
,tu2.name modifyAccountName
from t_system_notice tsn
left join t_user tu1 on tsn.create_account = tu1.account
left join t_user tu2 on tsn.modify_account = tu2.account
where tsn.id = #{id}
</select>
<sql id="findPageWithWhere">
<where> 1=1
and tsn.status != 0
<if test="allList != null and allList == 0" >
and tsn.status = 1
</if>
<if test="id != null and id != ''" >
and tsn.id = #{id,jdbcType=INTEGER}
</if>
<if test="title != null and title != ''" >
and tsn.title = #{title,jdbcType=VARCHAR}
</if>
<if test="type != null" >
and tsn.type = #{type,jdbcType=INTEGER}
</if>
<if test="content != null and content != ''" >
and tsn.content = #{content,jdbcType=VARCHAR}
</if>
<if test="createAccount != null and createAccount != ''" >
and tsn.create_account = #{createAccount,jdbcType=VARCHAR}
</if>
<if test="createTime != null" >
and tsn.create_time = #{createTime,jdbcType=TIMESTAMP}
</if>
<if test="modifyAccount != null and modifyAccount != ''" >
and tsn.modify_account = #{modifyAccount,jdbcType=VARCHAR}
</if>
<if test="modifyTime != null" >
and tsn.modify_time = #{modifyTime,jdbcType=TIMESTAMP}
</if>
<if test="publishTime != null" >
and tsn.publish_time = #{publishTime,jdbcType=TIMESTAMP}
</if>
<if test="noticeAnnex != null and noticeAnnex != ''" >
and tsn.notice_annex = #{noticeAnnex,jdbcType=VARCHAR}
</if>
<if test="fileAnnex != null and fileAnnex != ''" >
and tsn.file_annex = #{fileAnnex,jdbcType=VARCHAR}
</if>
<if test="allList != null and allList == 0 and type ==1">
<![CDATA[ and DATE_FORMAT(tsn.display_from, '%Y-%m-%d')<= DATE_FORMAT(#{nowDate}, '%Y-%m-%d') ]]>
</if>
<if test="allList != null and allList == 0 and type ==1">
<![CDATA[ and DATE_FORMAT(tsn.display_end, '%Y-%m-%d')>= DATE_FORMAT(#{nowDate}, '%Y-%m-%d') ]]>
</if>
</where>
</sql>
<!-- <select id="findPageWithResult" parameterType="com.starcharge.wios.dto.SystemNoticeDTO" resultMap="BaseResultMap">-->
<!-- select-->
<!-- <include refid="Base_Column_List" />-->
<!-- from t_system_notice-->
<!-- <include refid="findPageWithWhere" />-->
<!-- limit #{start},#{pageSize}-->
<!-- </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.boco.nbd.wios.manage.mapper.def.UploadFileMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.common.bo.UploadFile">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="use_type" jdbcType="INTEGER" property="useType" />
<result column="third_party_id" jdbcType="VARCHAR" property="thirdPartyId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="url" jdbcType="VARCHAR" property="url" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="remark" jdbcType="VARCHAR" property="remark" />
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
</resultMap>
<sql id="Base_Column_List">
id, type, use_type, third_party_id, name, url, status, remark, update_by, create_by,
update_time, create_time
</sql>
<delete id="delete" parameterType="java.lang.Integer">
delete from t_upload_file
where id = #{id,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.common.bo.UploadFile">
insert into t_upload_file (id, type, use_type,
third_party_id, name, url,
status, remark, update_by,
create_by, update_time, create_time
)
values (#{id,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{useType,jdbcType=INTEGER},
#{thirdPartyId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{remark,jdbcType=VARCHAR}, #{updateBy,jdbcType=VARCHAR},
#{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertDynamic" parameterType="com.boco.nbd.wios.manage.entity.common.bo.UploadFile">
insert into t_upload_file
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="type != null">
type,
</if>
<if test="useType != null">
use_type,
</if>
<if test="thirdPartyId != null">
third_party_id,
</if>
<if test="name != null">
name,
</if>
<if test="url != null">
url,
</if>
<if test="status != null">
status,
</if>
<if test="remark != null">
remark,
</if>
<if test="updateBy != null">
update_by,
</if>
<if test="createBy != null">
create_by,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="createTime != null">
create_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="type != null">
#{type,jdbcType=INTEGER},
</if>
<if test="useType != null">
#{useType,jdbcType=INTEGER},
</if>
<if test="thirdPartyId != null">
#{thirdPartyId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="url != null">
#{url,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="remark != null">
#{remark,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
#{updateBy,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
#{createBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateDynamic" parameterType="com.boco.nbd.wios.manage.entity.common.bo.UploadFile">
update t_upload_file
<set>
<if test="type != null">
type = #{type,jdbcType=INTEGER},
</if>
<if test="useType != null">
use_type = #{useType,jdbcType=INTEGER},
</if>
<if test="thirdPartyId != null">
third_party_id = #{thirdPartyId,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="url != null">
url = #{url,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="remark != null">
remark = #{remark,jdbcType=VARCHAR},
</if>
<if test="updateBy != null">
update_by = #{updateBy,jdbcType=VARCHAR},
</if>
<if test="createBy != null">
create_by = #{createBy,jdbcType=VARCHAR},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="update" parameterType="com.boco.nbd.wios.manage.entity.common.bo.UploadFile">
update t_upload_file
set type = #{type,jdbcType=INTEGER},
use_type = #{useType,jdbcType=INTEGER},
third_party_id = #{thirdPartyId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
remark = #{remark,jdbcType=VARCHAR},
update_by = #{updateBy,jdbcType=VARCHAR},
create_by = #{createBy,jdbcType=VARCHAR},
update_time = #{updateTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectById" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_upload_file
where id = #{id,jdbcType=INTEGER}
</select>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.common.bo.UploadFile"
resultType="com.boco.nbd.wios.manage.entity.common.bo.UploadFile">
select t.* from t_upload_file t
<where>
<if test="type != null ">
and t.type=#{type}
</if>
<if test="thirdPartyId != null and thirdPartyId != ''">
and t.third_party_id = #{thirdPartyId}
</if>
<if test="status != null">
and t.status = #{status}
</if>
</where>
</select>
<insert id="batchInsert" parameterType="java.util.List">
insert into t_upload_file (id, type,use_type, third_party_id,
name, url, status,
remark, update_by, create_by,
update_time, create_time)
values
<foreach collection="list" item="item" separator=",">
(#{item.id,jdbcType=INTEGER}, #{item.type,jdbcType=INTEGER}, #{item.useType,jdbcType=INTEGER}, #{item.thirdPartyId,jdbcType=VARCHAR},
#{item.name,jdbcType=VARCHAR}, #{item.url,jdbcType=VARCHAR}, #{item.status,jdbcType=INTEGER},
#{item.remark,jdbcType=VARCHAR}, #{item.updateBy,jdbcType=VARCHAR}, #{item.createBy,jdbcType=VARCHAR},
#{item.updateTime,jdbcType=TIMESTAMP}, #{item.createTime,jdbcType=TIMESTAMP})
</foreach>
</insert>
<delete id="deleteByTypeAndThirdPartyId">
update t_upload_file
set status = 2
where type=#{type} and third_party_id = #{tPId}
</delete>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.UserMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.User">
<id column="id" jdbcType="INTEGER" property="id" />
<result column="account" jdbcType="VARCHAR" property="account" />
<result column="password" jdbcType="VARCHAR" property="password" />
<result column="password_salt" jdbcType="VARCHAR" property="passwordSalt" />
<result column="open_id" jdbcType="VARCHAR" property="openId" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="email" jdbcType="VARCHAR" property="email" />
<result column="nick_name" jdbcType="VARCHAR" property="nickName" />
<result column="head_img" jdbcType="VARCHAR" property="headImg" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="last_login_time" jdbcType="TIMESTAMP" property="lastLoginTime" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</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, account, password, password_salt, open_id, name, email, nick_name, head_img,
status, amount, last_login_time, create_account, create_time, modify_account, modify_time
</sql>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.UserCriteria" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_user
<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.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_user
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from t_user
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.UserCriteria">
delete from t_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.User">
insert into t_user (id, account, password,
password_salt, open_id, name,
email, nick_name, head_img,
status, amount, last_login_time,
create_account, create_time, modify_account,
modify_time)
values (#{id,jdbcType=INTEGER}, #{account,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{passwordSalt,jdbcType=VARCHAR}, #{openId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{email,jdbcType=VARCHAR}, #{nickName,jdbcType=VARCHAR}, #{headImg,jdbcType=VARCHAR},
#{status,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{lastLoginTime,jdbcType=TIMESTAMP},
#{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.User">
insert into t_user
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="account != null">
account,
</if>
<if test="password != null">
password,
</if>
<if test="passwordSalt != null">
password_salt,
</if>
<if test="openId != null">
open_id,
</if>
<if test="name != null">
name,
</if>
<if test="email != null">
email,
</if>
<if test="nickName != null">
nick_name,
</if>
<if test="headImg != null">
head_img,
</if>
<if test="status != null">
status,
</if>
<if test="amount != null">
amount,
</if>
<if test="lastLoginTime != null">
last_login_time,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="account != null">
#{account,jdbcType=VARCHAR},
</if>
<if test="password != null">
#{password,jdbcType=VARCHAR},
</if>
<if test="passwordSalt != null">
#{passwordSalt,jdbcType=VARCHAR},
</if>
<if test="openId != null">
#{openId,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="email != null">
#{email,jdbcType=VARCHAR},
</if>
<if test="nickName != null">
#{nickName,jdbcType=VARCHAR},
</if>
<if test="headImg != null">
#{headImg,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="lastLoginTime != null">
#{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.UserCriteria" resultType="java.lang.Long">
select count(*) from t_user
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_user
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.account != null">
account = #{record.account,jdbcType=VARCHAR},
</if>
<if test="record.password != null">
password = #{record.password,jdbcType=VARCHAR},
</if>
<if test="record.passwordSalt != null">
password_salt = #{record.passwordSalt,jdbcType=VARCHAR},
</if>
<if test="record.openId != null">
open_id = #{record.openId,jdbcType=VARCHAR},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.email != null">
email = #{record.email,jdbcType=VARCHAR},
</if>
<if test="record.nickName != null">
nick_name = #{record.nickName,jdbcType=VARCHAR},
</if>
<if test="record.headImg != null">
head_img = #{record.headImg,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.amount != null">
amount = #{record.amount,jdbcType=DECIMAL},
</if>
<if test="record.lastLoginTime != null">
last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="record.createAccount != null">
create_account = #{record.createAccount,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.modifyAccount != null">
modify_account = #{record.modifyAccount,jdbcType=VARCHAR},
</if>
<if test="record.modifyTime != null">
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_user
set id = #{record.id,jdbcType=INTEGER},
account = #{record.account,jdbcType=VARCHAR},
password = #{record.password,jdbcType=VARCHAR},
password_salt = #{record.passwordSalt,jdbcType=VARCHAR},
open_id = #{record.openId,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
email = #{record.email,jdbcType=VARCHAR},
nick_name = #{record.nickName,jdbcType=VARCHAR},
head_img = #{record.headImg,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
amount = #{record.amount,jdbcType=DECIMAL},
last_login_time = #{record.lastLoginTime,jdbcType=TIMESTAMP},
create_account = #{record.createAccount,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
modify_account = #{record.modifyAccount,jdbcType=VARCHAR},
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.User">
update t_user
<set>
<if test="account != null">
account = #{account,jdbcType=VARCHAR},
</if>
<if test="password != null">
password = #{password,jdbcType=VARCHAR},
</if>
<if test="passwordSalt != null">
password_salt = #{passwordSalt,jdbcType=VARCHAR},
</if>
<if test="openId != null">
open_id = #{openId,jdbcType=VARCHAR},
</if>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="email != null">
email = #{email,jdbcType=VARCHAR},
</if>
<if test="nickName != null">
nick_name = #{nickName,jdbcType=VARCHAR},
</if>
<if test="headImg != null">
head_img = #{headImg,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="lastLoginTime != null">
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.User">
update t_user
set account = #{account,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
password_salt = #{passwordSalt,jdbcType=VARCHAR},
open_id = #{openId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
email = #{email,jdbcType=VARCHAR},
nick_name = #{nickName,jdbcType=VARCHAR},
head_img = #{headImg,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
amount = #{amount,jdbcType=DECIMAL},
last_login_time = #{lastLoginTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="list" parameterType="com.boco.nbd.wios.manage.entity.bo.User" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_user u
<where>
<if test="id!=null">
u.id = #{id}
</if>
<if test="account!=null and account!=''">
u.account = #{account}
</if>
<if test="openId!=null and openId!=''">
u.open_id = #{openId}
</if>
<if test="status!=null">
u.status = #{status}
</if>
order by u.create_time
</where>
</select>
<select id="count" parameterType="com.boco.nbd.wios.manage.entity.bo.User" resultType="java.lang.Integer">
select count(*)
from t_user u
<where>
<if test="id!=null">
u.id = #{id}
</if>
<if test="account!=null and account!=''">
u.account = #{account}
</if>
<if test="openId!=null and openId!=''">
u.open_id = #{openId}
</if>
<if test="status!=null">
u.status = #{status}
</if>
</where>
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.UserPayBillDeleteMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.UserPayBillDelete" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="user_id" property="userId" jdbcType="VARCHAR" />
<result column="user_phone" property="userPhone" jdbcType="VARCHAR" />
<result column="amount" property="amount" jdbcType="DECIMAL" />
<result column="info" property="info" jdbcType="VARCHAR" />
<result column="pay_type" property="payType" jdbcType="INTEGER" />
<result column="business_type" property="businessType" jdbcType="INTEGER" />
<result column="pay_account" property="payAccount" jdbcType="VARCHAR" />
<result column="pay_trade_no" property="payTradeNo" jdbcType="VARCHAR" />
<result column="pay_time" property="payTime" jdbcType="TIMESTAMP" />
<result column="ref_id" property="refId" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="source" property="source" jdbcType="INTEGER" />
<result column="create_account" property="createAccount" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
id, user_id, user_phone, amount, info, pay_type, business_type, pay_account, pay_trade_no,
pay_time, ref_id, status, source, create_account, create_time, modify_account, modify_time
</sql>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBillDelete" >
insert into t_user_pay_bill_delete (id, user_id, user_phone,
amount, info, pay_type,
business_type, pay_account, pay_trade_no,
pay_time, ref_id, status,
source, create_account, create_time,
modify_account, modify_time)
values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR},
#{amount,jdbcType=DECIMAL}, #{info,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER},
#{businessType,jdbcType=INTEGER}, #{payAccount,jdbcType=VARCHAR}, #{payTradeNo,jdbcType=VARCHAR},
#{payTime,jdbcType=TIMESTAMP}, #{refId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{source,jdbcType=INTEGER}, #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBillDelete" >
insert into t_user_pay_bill_delete
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="userId != null" >
user_id,
</if>
<if test="userPhone != null" >
user_phone,
</if>
<if test="amount != null" >
amount,
</if>
<if test="info != null" >
info,
</if>
<if test="payType != null" >
pay_type,
</if>
<if test="businessType != null" >
business_type,
</if>
<if test="payAccount != null" >
pay_account,
</if>
<if test="payTradeNo != null" >
pay_trade_no,
</if>
<if test="payTime != null" >
pay_time,
</if>
<if test="refId != null" >
ref_id,
</if>
<if test="status != null" >
status,
</if>
<if test="source != null" >
source,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="modifyAccount != null" >
modify_account,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="userId != null" >
#{userId,jdbcType=VARCHAR},
</if>
<if test="userPhone != null" >
#{userPhone,jdbcType=VARCHAR},
</if>
<if test="amount != null" >
#{amount,jdbcType=DECIMAL},
</if>
<if test="info != null" >
#{info,jdbcType=VARCHAR},
</if>
<if test="payType != null" >
#{payType,jdbcType=INTEGER},
</if>
<if test="businessType != null" >
#{businessType,jdbcType=INTEGER},
</if>
<if test="payAccount != null" >
#{payAccount,jdbcType=VARCHAR},
</if>
<if test="payTradeNo != null" >
#{payTradeNo,jdbcType=VARCHAR},
</if>
<if test="payTime != null" >
#{payTime,jdbcType=TIMESTAMP},
</if>
<if test="refId != null" >
#{refId,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="source != null" >
#{source,jdbcType=INTEGER},
</if>
<if test="createAccount != null" >
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null" >
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.def.UserPayBillMapper">
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.UserPayBill">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="user_id" jdbcType="VARCHAR" property="userId" />
<result column="user_phone" jdbcType="VARCHAR" property="userPhone" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="info" jdbcType="VARCHAR" property="info" />
<result column="pay_type" jdbcType="INTEGER" property="payType" />
<result column="business_type" jdbcType="INTEGER" property="businessType" />
<result column="pay_account" jdbcType="VARCHAR" property="payAccount" />
<result column="pay_trade_no" jdbcType="VARCHAR" property="payTradeNo" />
<result column="pay_time" jdbcType="TIMESTAMP" property="payTime" />
<result column="ref_id" jdbcType="VARCHAR" property="refId" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="source" jdbcType="INTEGER" property="source" />
<result column="create_account" jdbcType="VARCHAR" property="createAccount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="modify_account" jdbcType="VARCHAR" property="modifyAccount" />
<result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime" />
</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, user_id, user_phone, amount, info, pay_type, business_type, pay_account, pay_trade_no,
pay_time, ref_id, status, source, create_account, create_time, modify_account, modify_time
</sql>
<select id="selectByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBillCriteria" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_user_pay_bill
<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="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_user_pay_bill
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from t_user_pay_bill
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBillCriteria">
delete from t_user_pay_bill
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBill">
insert into t_user_pay_bill (id, user_id, user_phone,
amount, info, pay_type,
business_type, pay_account, pay_trade_no,
pay_time, ref_id, status,
source, create_account, create_time,
modify_account, modify_time)
values (#{id,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR}, #{userPhone,jdbcType=VARCHAR},
#{amount,jdbcType=DECIMAL}, #{info,jdbcType=VARCHAR}, #{payType,jdbcType=INTEGER},
#{businessType,jdbcType=INTEGER}, #{payAccount,jdbcType=VARCHAR}, #{payTradeNo,jdbcType=VARCHAR},
#{payTime,jdbcType=TIMESTAMP}, #{refId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{source,jdbcType=INTEGER}, #{createAccount,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBill">
insert into t_user_pay_bill
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="userId != null">
user_id,
</if>
<if test="userPhone != null">
user_phone,
</if>
<if test="amount != null">
amount,
</if>
<if test="info != null">
info,
</if>
<if test="payType != null">
pay_type,
</if>
<if test="businessType != null">
business_type,
</if>
<if test="payAccount != null">
pay_account,
</if>
<if test="payTradeNo != null">
pay_trade_no,
</if>
<if test="payTime != null">
pay_time,
</if>
<if test="refId != null">
ref_id,
</if>
<if test="status != null">
status,
</if>
<if test="source != null">
source,
</if>
<if test="createAccount != null">
create_account,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="modifyAccount != null">
modify_account,
</if>
<if test="modifyTime != null">
modify_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="userId != null">
#{userId,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
#{userPhone,jdbcType=VARCHAR},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
<if test="info != null">
#{info,jdbcType=VARCHAR},
</if>
<if test="payType != null">
#{payType,jdbcType=INTEGER},
</if>
<if test="businessType != null">
#{businessType,jdbcType=INTEGER},
</if>
<if test="payAccount != null">
#{payAccount,jdbcType=VARCHAR},
</if>
<if test="payTradeNo != null">
#{payTradeNo,jdbcType=VARCHAR},
</if>
<if test="payTime != null">
#{payTime,jdbcType=TIMESTAMP},
</if>
<if test="refId != null">
#{refId,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="source != null">
#{source,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
#{modifyTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBillCriteria" resultType="java.lang.Long">
select count(*) from t_user_pay_bill
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_user_pay_bill
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=VARCHAR},
</if>
<if test="record.userPhone != null">
user_phone = #{record.userPhone,jdbcType=VARCHAR},
</if>
<if test="record.amount != null">
amount = #{record.amount,jdbcType=DECIMAL},
</if>
<if test="record.info != null">
info = #{record.info,jdbcType=VARCHAR},
</if>
<if test="record.payType != null">
pay_type = #{record.payType,jdbcType=INTEGER},
</if>
<if test="record.businessType != null">
business_type = #{record.businessType,jdbcType=INTEGER},
</if>
<if test="record.payAccount != null">
pay_account = #{record.payAccount,jdbcType=VARCHAR},
</if>
<if test="record.payTradeNo != null">
pay_trade_no = #{record.payTradeNo,jdbcType=VARCHAR},
</if>
<if test="record.payTime != null">
pay_time = #{record.payTime,jdbcType=TIMESTAMP},
</if>
<if test="record.refId != null">
ref_id = #{record.refId,jdbcType=VARCHAR},
</if>
<if test="record.status != null">
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.source != null">
source = #{record.source,jdbcType=INTEGER},
</if>
<if test="record.createAccount != null">
create_account = #{record.createAccount,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.modifyAccount != null">
modify_account = #{record.modifyAccount,jdbcType=VARCHAR},
</if>
<if test="record.modifyTime != null">
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_user_pay_bill
set id = #{record.id,jdbcType=VARCHAR},
user_id = #{record.userId,jdbcType=VARCHAR},
user_phone = #{record.userPhone,jdbcType=VARCHAR},
amount = #{record.amount,jdbcType=DECIMAL},
info = #{record.info,jdbcType=VARCHAR},
pay_type = #{record.payType,jdbcType=INTEGER},
business_type = #{record.businessType,jdbcType=INTEGER},
pay_account = #{record.payAccount,jdbcType=VARCHAR},
pay_trade_no = #{record.payTradeNo,jdbcType=VARCHAR},
pay_time = #{record.payTime,jdbcType=TIMESTAMP},
ref_id = #{record.refId,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
source = #{record.source,jdbcType=INTEGER},
create_account = #{record.createAccount,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
modify_account = #{record.modifyAccount,jdbcType=VARCHAR},
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBill">
update t_user_pay_bill
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=VARCHAR},
</if>
<if test="userPhone != null">
user_phone = #{userPhone,jdbcType=VARCHAR},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
<if test="info != null">
info = #{info,jdbcType=VARCHAR},
</if>
<if test="payType != null">
pay_type = #{payType,jdbcType=INTEGER},
</if>
<if test="businessType != null">
business_type = #{businessType,jdbcType=INTEGER},
</if>
<if test="payAccount != null">
pay_account = #{payAccount,jdbcType=VARCHAR},
</if>
<if test="payTradeNo != null">
pay_trade_no = #{payTradeNo,jdbcType=VARCHAR},
</if>
<if test="payTime != null">
pay_time = #{payTime,jdbcType=TIMESTAMP},
</if>
<if test="refId != null">
ref_id = #{refId,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="source != null">
source = #{source,jdbcType=INTEGER},
</if>
<if test="createAccount != null">
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null">
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null">
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBill">
update t_user_pay_bill
set user_id = #{userId,jdbcType=VARCHAR},
user_phone = #{userPhone,jdbcType=VARCHAR},
amount = #{amount,jdbcType=DECIMAL},
info = #{info,jdbcType=VARCHAR},
pay_type = #{payType,jdbcType=INTEGER},
business_type = #{businessType,jdbcType=INTEGER},
pay_account = #{payAccount,jdbcType=VARCHAR},
pay_trade_no = #{payTradeNo,jdbcType=VARCHAR},
pay_time = #{payTime,jdbcType=TIMESTAMP},
ref_id = #{refId,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
source = #{source,jdbcType=INTEGER},
create_account = #{createAccount,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="list" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBill" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_user_pay_bill b
<where>
<if test="id!=null and id!=''">
b.id = #{id}
</if>
<if test="refId!=null and refId!=''">
b.ref_id = #{refId}
</if>
<if test="userId!=null and userId!=''">
b.user_id = #{userId}
</if>
<if test="userPhone!=null and userPhone!=''">
b.user_phone = #{userPhone}
</if>
<if test="status!=null">
b.status = #{status}
</if>
<if test="businessType!=null">
b.business_type = #{businessType}
</if>
order by b.create_time desc
</where>
</select>
<select id="count" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBill" resultType="java.lang.Integer">
select count(*)
from t_user_pay_bill b
<where>
<if test="id!=null and id!=''">
b.id = #{id}
</if>
<if test="refId!=null and refId!=''">
b.ref_id = #{refId}
</if>
<if test="userId!=null and userId!=''">
b.user_id = #{userId}
</if>
<if test="userPhone!=null and userPhone!=''">
b.user_phone = #{userPhone}
</if>
<if test="status!=null">
b.status = #{status}
</if>
<if test="businessType!=null">
b.business_type = #{businessType}
</if>
</where>
</select>
<select id="selectList" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBill" resultType="com.boco.nbd.wios.manage.entity.bo.UserPayBillVo">
select b.*,o.status as orderStatus
from t_user_pay_bill b
left join t_order o on b.ref_id=o.id
<where>
<if test="id!=null and id!=''">
and b.id = #{id}
</if>
<if test="refId!=null and refId!=''">
and b.ref_id = #{refId}
</if>
<if test="userId!=null and userId!=''">
and b.user_id = #{userId}
</if>
<if test="userPhone!=null and userPhone!=''">
and (o.user_phone = #{userPhone} or o.survey_cams_phone=#{userPhone} or o.install_cams_phone=#{userPhone})
</if>
<if test="status!=null">
and b.status = #{status}
</if>
<if test="businessType!=null">
and b.business_type = #{businessType}
</if>
order by b.create_time desc
</where>
</select>
<select id="selectListForApp" parameterType="com.boco.nbd.wios.manage.entity.bo.UserPayBill" resultType="com.boco.nbd.wios.manage.entity.bo.UserPayBillVo">
select b.*,o.status as orderStatus,o.install_finish_time as installFinishTime
from t_user_pay_bill b
left join t_order o on b.ref_id=o.id
<where>
<if test="id!=null and id!=''">
and b.id = #{id}
</if>
<if test="refId!=null and refId!=''">
and b.ref_id = #{refId}
</if>
<if test="userPhone!=null and userPhone!=''">
and (o.user_phone = #{userPhone} or o.survey_cams_phone=#{userPhone} or o.install_cams_phone=#{userPhone})
</if>
<if test="status!=null">
and b.status = #{status}
</if>
order by b.create_time desc
</where>
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.flow.mapper.def.VisualManagementMapper">
<select id="getNodeFlagByArea" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementBO">
SELECT
area_id id,
area_name name,
node_flag,
count(*) num
FROM
t_order
WHERE
status!=64 and type=1 and process_ins_id is not null and area_id IN (SELECT id FROM t_region WHERE parent_id = '1')
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(area_id, #{areaId})
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and install_supplier_id = #{installSupplierId}
</if>
GROUP BY area_id,area_name,node_flag
</select>
<select id="getNodeFlagByInstallSupplierl" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementBO">
SELECT
install_supplier_id id,
install_supplier_name name,
node_flag,
count(*) num
FROM
t_order
where
status!=64 and type=1 and process_ins_id is not null
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="areaId != null and areaId != ''">
and area_id = #{areaId}
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and install_supplier_id = #{installSupplierId}
</if>
GROUP BY install_supplier_id,install_supplier_name,node_flag
</select>
<select id="getOvertimeNodeFlagByAreaCount" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementBO">
select area_id id,area_name name,left(NAME_,3) node_flag,SUM(IF( NOW() > DUE_DATE_ ,1,0)) num from
(SELECT
a.area_id,
a.area_name,
b.*
FROM
t_order a right JOIN ACT_HI_TASKINST b on a.process_ins_id=b.PROC_INST_ID_ and a.node_flag=left(b.NAME_,3)
WHERE
a.STATUS != 64
AND a.type = 1
AND a.process_ins_id IS NOT NULL and a.area_id IN (SELECT id FROM t_region WHERE parent_id = '1')
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(a.create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(a.create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(a.area_id, #{areaId})
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and a.install_supplier_id = #{installSupplierId}
</if>
) c
GROUP BY area_id,area_name,NAME_
</select>
<select id="getOvertimeNodeFlagByInstallSupplierl" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementBO">
select install_supplier_id id,install_supplier_name name,left(NAME_,3) node_flag,SUM(IF( NOW() > DUE_DATE_ ,1,0)) num from
(SELECT
a.install_supplier_id,
a.install_supplier_name,
b.*
FROM
t_order a right JOIN ACT_HI_TASKINST b on a.process_ins_id=b.PROC_INST_ID_ and a.node_flag=left(b.NAME_,3)
WHERE
a.STATUS != 64
AND a.type = 1
AND a.process_ins_id IS NOT NULL
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(a.create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(a.create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(a.area_id, #{areaId})
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and a.install_supplier_id = #{installSupplierId}
</if>
) c
GROUP BY install_supplier_id,install_supplier_name,NAME_
</select>
<select id="getAboutOvertimeNodeFlagByAreaCount" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementBO">
SELECT
area_id id,
area_name NAME,
node_flag,
SUM(
case node_flag
when '101' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 4.8 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '103' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 4.8 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '115' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 72 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '104' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 4.8 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '106' then IF ( TIMESTAMPDIFF( MINUTE , START_TIME_, DUE_DATE_ )*0.8 &lt; TIMESTAMPDIFF( MINUTE , START_TIME_, NOW() ) AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '107' then IF ( TIMESTAMPDIFF( MINUTE , START_TIME_, DUE_DATE_ )*0.8 &lt; TIMESTAMPDIFF( MINUTE , START_TIME_, NOW() ) AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '108' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 4.8 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '111' then IF ( TIMESTAMPDIFF( MINUTE , START_TIME_, DUE_DATE_ )*0.8 &lt; TIMESTAMPDIFF( MINUTE , START_TIME_, NOW() ) AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '112' then IF ( TIMESTAMPDIFF( MINUTE , START_TIME_, DUE_DATE_ )*0.8 &lt; TIMESTAMPDIFF( MINUTE , START_TIME_, NOW() ) AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
else 0 end
) num
FROM
(
SELECT
a.node_flag,
a.area_id,
a.area_name,
b.*
FROM
t_order a
RIGHT JOIN ACT_HI_TASKINST b ON a.process_ins_id = b.PROC_INST_ID_
AND a.node_flag = LEFT ( b.NAME_, 3 )
WHERE
a.STATUS != 64
AND a.type = 1
AND a.process_ins_id IS NOT NULL
AND a.area_id IN ( SELECT id FROM t_region WHERE parent_id = '1' )
AND b.DUE_DATE_ IS NOT NULL
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(a.create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(a.create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(a.area_id, #{areaId})
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and a.install_supplier_id = #{installSupplierId}
</if>
) c
GROUP BY
area_id,
area_name,
node_flag
</select>
<select id="getAboutOvertimeNodeFlagByInstallSupplierl" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementBO">
SELECT
install_supplier_id id,
install_supplier_name name,
node_flag,
SUM(
case node_flag
when '101' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 4.8 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '103' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 4.8 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '115' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 72 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '104' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 4.8 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '106' then IF ( TIMESTAMPDIFF( MINUTE , START_TIME_, DUE_DATE_ )*0.8 &lt; TIMESTAMPDIFF( MINUTE , START_TIME_, NOW() ) AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '107' then IF ( TIMESTAMPDIFF( MINUTE , START_TIME_, DUE_DATE_ )*0.8 &lt; TIMESTAMPDIFF( MINUTE , START_TIME_, NOW() ) AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '108' then IF ( ROUND(TIMESTAMPDIFF( MINUTE , NOW(), DUE_DATE_ )/60,2) &lt; 4.8 AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '111' then IF ( TIMESTAMPDIFF( MINUTE , START_TIME_, DUE_DATE_ )*0.8 &lt; TIMESTAMPDIFF( MINUTE , START_TIME_, NOW() ) AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
when '112' then IF ( TIMESTAMPDIFF( MINUTE , START_TIME_, DUE_DATE_ )*0.8 &lt; TIMESTAMPDIFF( MINUTE , START_TIME_, NOW() ) AND TIMESTAMPDIFF( MINUTE, NOW(), DUE_DATE_ ) > 0, 1, 0 )
else 0 end
) num
FROM
(
SELECT
a.node_flag,
a.install_supplier_id,
a.install_supplier_name,
b.*
FROM
t_order a right JOIN ACT_HI_TASKINST b on a.process_ins_id=b.PROC_INST_ID_ and a.node_flag=left(b.NAME_,3)
WHERE
a.STATUS != 64
AND a.type = 1
AND a.process_ins_id IS NOT NULL
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(a.create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(a.create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(a.area_id, #{areaId})
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and a.install_supplier_id = #{installSupplierId}
</if>
) c
GROUP BY
install_supplier_id,
install_supplier_name,
node_flag
</select>
<select id="getCustomerNode101ByArea" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementTowNumBO">
SELECT
area_id id,area_name name,
SUM(
IF
( survey_reserve_time IS NOT NULL, 1, 0 )) num1,
SUM(
IF
( survey_follow_time IS NOT NULL, 1, 0 )) num2
FROM
t_order where status!=64 and type=1 and node_flag > 101 and area_id IN (SELECT id FROM t_region WHERE parent_id = '1')
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(area_id, #{areaId})
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and install_supplier_id = #{installSupplierId}
</if>
GROUP BY
area_id,
area_name
</select>
<select id="getOrderReceivingBySupplierl" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementTowNumBO">
SELECT
install_supplier_id id,install_supplier_name name,
SUM(
IF
( refuse_order_reason IS NULL, 1, 0 )) num1,
SUM(
IF
( refuse_order_reason IS NOT NULL, 1, 0 )) num2
FROM
t_order where status!=64 and type=1 and node_flag > 103
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(area_id, #{areaId})
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and install_supplier_id = #{installSupplierId}
</if>
GROUP BY
install_supplier_id,
install_supplier_name
</select>
<select id="getOrderReceivingByAreaAndSupplierlId" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementTowNumBO">
SELECT
area_id id,area_name name,
SUM(
IF
( refuse_order_reason IS NULL, 1, 0 )) num1,
SUM(
IF
( refuse_order_reason IS NOT NULL, 1, 0 )) num2
FROM
t_order where status!=64 and type=1 and node_flag > 103 and area_id IN (SELECT id FROM t_region WHERE parent_id = '1')
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and install_supplier_id = #{installSupplierId}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(area_id, #{areaId})
</if>
GROUP BY
area_id,
area_name
</select>
<select id="getOrderSettlementBySupplierl" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementTowNumBO">
SELECT
install_supplier_id id,install_supplier_name name,
SUM(
IF
( node_flag = '113', 1, 0 )) num1,
SUM(
IF
( node_flag = '114', 1, 0 )) num2
FROM
t_order where status!=64 and type=1
<if test="installSupplierId != null and installSupplierId != ''">
and install_supplier_id = #{installSupplierId}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(area_id, #{areaId})
</if>
GROUP BY
install_supplier_name
</select>
<select id="getOrderSettlementByAreaAndSupplierlId" resultType="com.boco.nbd.wios.flow.entity.bo.VisualManagementTowNumBO">
SELECT
area_id id,area_name name,
SUM(
IF
( node_flag = '113', 1, 0 )) num1,
SUM(
IF
( node_flag = '114', 1, 0 )) num2
FROM
t_order where status!=64 and type=1 and area_id IN (SELECT id FROM t_region WHERE parent_id = '1')
<if test="startTime != null and startTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&gt;= #{startTime}
</if>
<if test="endTime != null and endTime != ''">
and DATE_FORMAT(create_time,'%Y-%m-%d')&lt;= #{endTime}
</if>
<if test="installSupplierId != null and installSupplierId != ''">
and install_supplier_id = #{installSupplierId}
</if>
<if test="areaId != null and areaId != ''">
and FIND_IN_SET(area_id, #{areaId})
</if>
GROUP BY
area_id,
area_name
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.extdb.CompanyMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Company" >
<result column="org_code" property="orgCode" jdbcType="VARCHAR" />
<result column="company_name" property="companyName" jdbcType="VARCHAR" />
<result column="company_id" property="companyId" jdbcType="VARCHAR" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
org_code, company_name, company_id
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.CompanyCriteria" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from t_company
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.CompanyCriteria" >
delete from t_company
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Company" >
insert into t_company (org_code, company_name, company_id
)
values (#{orgCode,jdbcType=VARCHAR}, #{companyName,jdbcType=VARCHAR}, #{companyId,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Company" >
insert into t_company
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="orgCode != null" >
org_code,
</if>
<if test="companyName != null" >
company_name,
</if>
<if test="companyId != null" >
company_id,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="orgCode != null" >
#{orgCode,jdbcType=VARCHAR},
</if>
<if test="companyName != null" >
#{companyName,jdbcType=VARCHAR},
</if>
<if test="companyId != null" >
#{companyId,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.CompanyCriteria" resultType="java.lang.Integer" >
select count(*) from t_company
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update t_company
<set >
<if test="record.orgCode != null" >
org_code = #{record.orgCode,jdbcType=VARCHAR},
</if>
<if test="record.companyName != null" >
company_name = #{record.companyName,jdbcType=VARCHAR},
</if>
<if test="record.companyId != null" >
company_id = #{record.companyId,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update t_company
set org_code = #{record.orgCode,jdbcType=VARCHAR},
company_name = #{record.companyName,jdbcType=VARCHAR},
company_id = #{record.companyId,jdbcType=VARCHAR}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.extdb.MaterialsMapperEx" >
<insert id="insertMaterials" >
INSERT INTO t_materials (id, appkey, materials_name, materials_code, regular_model, status, unit, type, description,create_time,create_account,modify_account,modify_time)
values
<foreach collection="materialsList" item="item" index="index"
separator=",">
(#{item.id},#{item.appkey},#{item.materialsName},#{item.materialsCode},#{item.regularModel},#{item.status},#{item.unit},#{item.type},'',#{item.createTime},#{item.createAccount},#{item.modifyAccount},#{item.modifyTime})
</foreach>
ON DUPLICATE KEY UPDATE
materials_name = values(materials_name),materials_code = values(materials_code),regular_model = values(regular_model),unit = values(unit),modify_account = values(modify_account),modify_time = now(),type = values(type)
</insert>
<select id="qryMaterialsList" resultType="com.boco.nbd.wios.manage.entity.bo.MaterialsEx">
SELECT
tm.id,
tm.materials_name,
tm.materials_code,
tm.regular_model,
tm.unit,
tm.type,
tm.description
FROM
t_materials tm
LEFT JOIN t_warehouse_materials twm ON tm.id = twm.materials_id
where tm.status = 1
and tm.appkey = #{appkey}
<if test="materialsName != null and materialsName != ''">
and tm.materials_name like CONCAT('%',#{materialsName},'%')
</if>
<if test="materialsCode != null and materialsCode != ''">
and tm.materials_code like CONCAT('%',#{materialsCode},'%')
</if>
<if test="regularModel != null and regularModel != '' ">
and tm.regular_model like CONCAT('%',#{regularModel},'%')
</if>
<if test="type != null">
and tm.type = #{type}
</if>
<if test="id != null and id != ''">
and tm.id = #{id}
</if>
<if test="typesList != null and typesList.size() > 0">
and tm.type in
<foreach collection="typesList" item="item" index="index"
open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="warehouseIds != null and warehouseIds.size() > 0">
and twm.warehouse_id in
<foreach collection="warehouseIds" item="item" index="index"
open="(" close=")" separator=",">
#{item}
</foreach>
</if>
group by tm.id order by tm.create_time desc
</select>
<select id="qryMaterialsStockList" resultType="com.boco.nbd.wios.manage.entity.bo.MaterialsEx">
SELECT
tm.id,
tm.materials_name,
tm.materials_code,
tm.regular_model,
tm.unit,
tm.type,
tm.description,
twm.warehouse_id,
tw.name warehouseName,
twm.total_number totalNumber,
twm.has_number hasNumber,
twm.remaining_number remainingNumber,
twm.stay_with_number stayWithNumber
FROM
t_materials tm
LEFT JOIN t_warehouse_materials twm ON tm.id = twm.materials_id
LEFT JOIN t_warehouse tw on tw.id = twm.warehouse_id
where tm.status = 1
and tm.appkey = #{appkey}
<if test="materialsName != null and materialsName != ''">
and tm.materials_name like CONCAT('%',#{materialsName},'%')
</if>
<if test="materialsCode != null and materialsCode != ''">
and tm.materials_code like CONCAT('%',#{materialsCode},'%')
</if>
<if test="regularModel != null and regularModel != '' ">
and tm.regular_model like CONCAT('%',#{regularModel},'%')
</if>
<if test="type != null">
and tm.type = #{type}
</if>
<if test="warehouseIds != null and warehouseIds.size() > 0">
and twm.warehouse_id in
<foreach collection="warehouseIds" item="item" index="index"
open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="id != null and id != ''">
and tm.id = #{id}
</if>
<if test="typesList != null and typesList.size() > 0">
and tm.type in
<foreach collection="typesList" item="item" index="index"
open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="isBindWareHouse != null and isBindWareHouse == 1">
and tw.name is not null
</if>
group by tw.id,tm.id order by tm.create_time desc
</select>
<select id="qryMaterialsCount" resultType="com.boco.nbd.wios.manage.entity.bo.MaterialsEx">
SELECT
tm.id,
tm.materials_name,
tm.materials_code,
tm.regular_model,
tm.unit,
tm.type,
tm.description
FROM
t_materials tm
where tm.status = 1
and tm.appkey = #{appkey}
<if test="materialsName != null and materialsName != ''">
and tm.materials_name = #{materialsName}
</if>
<if test="materialsCode != null and materialsCode != ''">
and tm.materials_code = #{materialsCode}
</if>
<if test="regularModel != null and regularModel != '' ">
and tm.regular_model = #{regularModel}
</if>
<if test="type != null">
and tm.type = #{type}
</if>
</select>
<update id="delMaterialsById">
update
t_materials
set
status = 0
where
id = #{materialsId}
</update>
<select id="getWarehouseMaterials" parameterType="string" resultType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterials">
SELECT
warehouse_id,
materials_id,
total_number,
has_number,
remaining_number,
stay_with_number
FROM
t_warehouse_materials
WHERE
1=1
<if test="materialsId != null and materialsId != ''">
and warehouse_id = #{warehouseId}
</if>
<if test="warehouseId != null and warehouseId != ''">
AND materials_id = #{materialsId}
</if>
</select>
<update id="updateWarehouseMaterials">
UPDATE t_warehouse_materials
SET
<if test="type != null and type == 3">
stay_with_number = stay_with_number - #{quantity},
has_number = has_number + #{quantity}
</if>
<if test="type != null and type != 3">
remaining_number = remaining_number - #{quantity},
has_number = has_number + #{quantity}
</if>
WHERE
warehouse_id = #{warhouseId}
AND materials_id = #{materialsId}
</update>
<insert id="insertWarehouseMaterials">
insert into t_warehouse_materials
( warehouse_id,materials_id,total_number,has_number,remaining_number)
values
(#{warehouseId},#{materialsId},#{totalNumber},#{hasNumber},#{remainingNumber})
ON DUPLICATE KEY UPDATE total_number = total_number + values(total_number),remaining_number = remaining_number + values(remaining_number)
</insert>
<select id="selectMaterialsCode" parameterType="String" resultType="String">
SELECT
t_materials.materials_code
FROM
t_materials
WHERE
t_materials.id=#{id}
</select>
<select id="selectIdForPrice" parameterType="String" resultType="String">
SELECT
tm.id
FROM
t_materials tm
where tm.status = 1 AND
tm.materials_code=#{materialsCode}
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.extdb.SingleMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Single" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="INTEGER" />
<result column="receiver" property="receiver" jdbcType="VARCHAR" />
<result column="shipping_address" property="shippingAddress" jdbcType="VARCHAR" />
<result column="contact_number" property="contactNumber" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="info" property="info" jdbcType="VARCHAR" />
<result column="transfer_in" property="transferIn" jdbcType="VARCHAR" />
<result column="transfer_out" property="transferOut" jdbcType="VARCHAR" />
<result column="appkey" property="appkey" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="create_account" property="createAccount" jdbcType="VARCHAR" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
<result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
id, type, receiver, shipping_address, contact_number, status, info, transfer_in,
transfer_out, appkey, create_time, create_account, modify_time, modify_account
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.SingleCriteria" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from t_single
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from t_single
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from t_single
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.SingleCriteria" >
delete from t_single
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Single" >
insert into t_single (id, type, receiver,
shipping_address, contact_number, status,
info, transfer_in, transfer_out,
appkey, create_time, create_account,
modify_time, modify_account)
values (#{id,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, #{receiver,jdbcType=VARCHAR},
#{shippingAddress,jdbcType=VARCHAR}, #{contactNumber,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{info,jdbcType=VARCHAR}, #{transferIn,jdbcType=VARCHAR}, #{transferOut,jdbcType=VARCHAR},
#{appkey,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createAccount,jdbcType=VARCHAR},
#{modifyTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Single" >
insert into t_single
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="type != null" >
type,
</if>
<if test="receiver != null" >
receiver,
</if>
<if test="shippingAddress != null" >
shipping_address,
</if>
<if test="contactNumber != null" >
contact_number,
</if>
<if test="status != null" >
status,
</if>
<if test="info != null" >
info,
</if>
<if test="transferIn != null" >
transfer_in,
</if>
<if test="transferOut != null" >
transfer_out,
</if>
<if test="appkey != null" >
appkey,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
<if test="modifyAccount != null" >
modify_account,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=INTEGER},
</if>
<if test="receiver != null" >
#{receiver,jdbcType=VARCHAR},
</if>
<if test="shippingAddress != null" >
#{shippingAddress,jdbcType=VARCHAR},
</if>
<if test="contactNumber != null" >
#{contactNumber,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="info != null" >
#{info,jdbcType=VARCHAR},
</if>
<if test="transferIn != null" >
#{transferIn,jdbcType=VARCHAR},
</if>
<if test="transferOut != null" >
#{transferOut,jdbcType=VARCHAR},
</if>
<if test="appkey != null" >
#{appkey,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null" >
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null" >
#{modifyAccount,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.SingleCriteria" resultType="java.lang.Integer" >
select count(*) from t_single
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update t_single
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.type != null" >
type = #{record.type,jdbcType=INTEGER},
</if>
<if test="record.receiver != null" >
receiver = #{record.receiver,jdbcType=VARCHAR},
</if>
<if test="record.shippingAddress != null" >
shipping_address = #{record.shippingAddress,jdbcType=VARCHAR},
</if>
<if test="record.contactNumber != null" >
contact_number = #{record.contactNumber,jdbcType=VARCHAR},
</if>
<if test="record.status != null" >
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.info != null" >
info = #{record.info,jdbcType=VARCHAR},
</if>
<if test="record.transferIn != null" >
transfer_in = #{record.transferIn,jdbcType=VARCHAR},
</if>
<if test="record.transferOut != null" >
transfer_out = #{record.transferOut,jdbcType=VARCHAR},
</if>
<if test="record.appkey != null" >
appkey = #{record.appkey,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.createAccount != null" >
create_account = #{record.createAccount,jdbcType=VARCHAR},
</if>
<if test="record.modifyTime != null" >
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="record.modifyAccount != null" >
modify_account = #{record.modifyAccount,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update t_single
set id = #{record.id,jdbcType=VARCHAR},
type = #{record.type,jdbcType=INTEGER},
receiver = #{record.receiver,jdbcType=VARCHAR},
shipping_address = #{record.shippingAddress,jdbcType=VARCHAR},
contact_number = #{record.contactNumber,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
info = #{record.info,jdbcType=VARCHAR},
transfer_in = #{record.transferIn,jdbcType=VARCHAR},
transfer_out = #{record.transferOut,jdbcType=VARCHAR},
appkey = #{record.appkey,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_account = #{record.createAccount,jdbcType=VARCHAR},
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
modify_account = #{record.modifyAccount,jdbcType=VARCHAR}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Single" >
update t_single
<set >
<if test="type != null" >
type = #{type,jdbcType=INTEGER},
</if>
<if test="receiver != null" >
receiver = #{receiver,jdbcType=VARCHAR},
</if>
<if test="shippingAddress != null" >
shipping_address = #{shippingAddress,jdbcType=VARCHAR},
</if>
<if test="contactNumber != null" >
contact_number = #{contactNumber,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="info != null" >
info = #{info,jdbcType=VARCHAR},
</if>
<if test="transferIn != null" >
transfer_in = #{transferIn,jdbcType=VARCHAR},
</if>
<if test="transferOut != null" >
transfer_out = #{transferOut,jdbcType=VARCHAR},
</if>
<if test="appkey != null" >
appkey = #{appkey,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null" >
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null" >
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.Single" >
update t_single
set type = #{type,jdbcType=INTEGER},
receiver = #{receiver,jdbcType=VARCHAR},
shipping_address = #{shippingAddress,jdbcType=VARCHAR},
contact_number = #{contactNumber,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
info = #{info,jdbcType=VARCHAR},
transfer_in = #{transferIn,jdbcType=VARCHAR},
transfer_out = #{transferOut,jdbcType=VARCHAR},
appkey = #{appkey,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.extdb.SingleMapperEx" >
<insert id="saveSingleMaterials" >
insert into t_single_materials (signal_id,materials_id,quantity)
values
<foreach collection="singleMaterialsList" item="item" index="index"
separator=",">
(#{item.signalId},#{item.materialsId},#{item.quantity})
</foreach>
</insert>
<select id="qrySingle" resultType="com.boco.nbd.wios.manage.entity.bo.SingleQo">
SELECT
ts.id id,
ts.create_time createTime,
ts.create_account createAccount,
ts.info info,
ts.type type,
(select name from t_warehouse where id = ts.transfer_in) as transferInName,
(select name from t_warehouse where id = ts.transfer_out) as transferOutName,
ts.shipping_address shippingAddress,
ts.contact_number contactNumber,
ts.receiver receiver,
tw.service_provider serviceProviderIn,
tw1.service_provider serviceProviderOut
FROM
t_single ts
LEFT JOIN t_single_materials tsm ON ts.id = tsm.signal_id
LEFT JOIN t_materials tm ON tsm.materials_id = tm.id
LEFT JOIN t_warehouse tw on ts.transfer_in = tw.id
LEFT JOIN t_warehouse tw1 on ts.transfer_out = tw1.id
where ts.appkey = #{appkey}
<if test="singleId != null and singleId != ''">
and ts.id = #{singleId}
</if>
<if test="type != null">
and ts.type = #{type}
</if>
<if test="transferIn != null and transferIn != ''">
and ts.transfer_in = #{transferIn}
</if>
<if test="transferOut != null and transferOut != '' ">
and ts.transfer_out = #{transferOut}
</if>
<if test="materialsCode != null and materialsCode != ''">
and tm.materials_code like CONCAT('%',#{materialsCode},'%')
</if>
<if test="shippingAddress != null and shippingAddress != ''">
and ts.shipping_address like CONCAT('%',#{shippingAddress},'%')
</if>
<if test="contactNumber != null and contactNumber != ''">
and ts.contact_number like CONCAT('%',#{contactNumber},'%')
</if>
<if test="receiver != null and receiver != ''">
and ts.receiver like CONCAT('%',#{receiver},'%')
</if>
<if test="serviceProviders != null and serviceProviders.size() > 0">
and (tw.service_provider in
<foreach collection="serviceProviders" item="item" index="index"
open="(" close=")" separator=",">
#{item}
</foreach>
or tw1.service_provider in
<foreach collection="serviceProviders" item="item" index="index"
open="(" close=")" separator=",">
#{item}
</foreach>
)
</if>
GROUP BY ts.id order by ts.create_time desc
</select>
<select id="qrySingleMaterialsBySingleId" parameterType="string" resultType="com.boco.nbd.wios.manage.entity.bo.SingleMaterialsQo">
SELECT
tsm.quantity quantity,
tm.materials_name materialsName,
tm.materials_code materialsCode,
tm.unit unit,
tm.regular_model regularModel
FROM
t_single_materials tsm
LEFT JOIN t_materials tm ON tsm.materials_id = tm.id
where tsm.signal_id = #{singleId}
</select>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.extdb.WarehouseLevenMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" >
<id column="id" property="id" jdbcType="INTEGER" />
<result column="appkey" property="appkey" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="parent_id" property="parentId" jdbcType="INTEGER" />
<result column="seq" property="seq" jdbcType="INTEGER" />
<result column="path_code" property="pathCode" jdbcType="VARCHAR" />
<result column="path_name" property="pathName" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="create_account" property="createAccount" jdbcType="VARCHAR" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
<result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" />
<result column="msg" property="msg" jdbcType="VARCHAR" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
id, appkey, name, parent_id, seq, path_code, path_name, status, create_time, create_account,
modify_time, modify_account, msg
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLevenCriteria" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from t_warehouse_leven
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
select
<include refid="Base_Column_List" />
from t_warehouse_leven
where id = #{id,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
delete from t_warehouse_leven
where id = #{id,jdbcType=INTEGER}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLevenCriteria" >
delete from t_warehouse_leven
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" >
insert into t_warehouse_leven (id, appkey, name,
parent_id, seq, path_code,
path_name, status, create_time,
create_account, modify_time, modify_account,
msg)
values (#{id,jdbcType=INTEGER}, #{appkey,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{parentId,jdbcType=INTEGER}, #{seq,jdbcType=INTEGER}, #{pathCode,jdbcType=VARCHAR},
#{pathName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{createAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP}, #{modifyAccount,jdbcType=VARCHAR},
#{msg,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" >
insert into t_warehouse_leven
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="appkey != null" >
appkey,
</if>
<if test="name != null" >
name,
</if>
<if test="parentId != null" >
parent_id,
</if>
<if test="seq != null" >
seq,
</if>
<if test="pathCode != null" >
path_code,
</if>
<if test="pathName != null" >
path_name,
</if>
<if test="status != null" >
status,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
<if test="modifyAccount != null" >
modify_account,
</if>
<if test="msg != null" >
msg,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=INTEGER},
</if>
<if test="appkey != null" >
#{appkey,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="parentId != null" >
#{parentId,jdbcType=INTEGER},
</if>
<if test="seq != null" >
#{seq,jdbcType=INTEGER},
</if>
<if test="pathCode != null" >
#{pathCode,jdbcType=VARCHAR},
</if>
<if test="pathName != null" >
#{pathName,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null" >
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null" >
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="msg != null" >
#{msg,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLevenCriteria" resultType="java.lang.Integer" >
select count(*) from t_warehouse_leven
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update t_warehouse_leven
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=INTEGER},
</if>
<if test="record.appkey != null" >
appkey = #{record.appkey,jdbcType=VARCHAR},
</if>
<if test="record.name != null" >
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.parentId != null" >
parent_id = #{record.parentId,jdbcType=INTEGER},
</if>
<if test="record.seq != null" >
seq = #{record.seq,jdbcType=INTEGER},
</if>
<if test="record.pathCode != null" >
path_code = #{record.pathCode,jdbcType=VARCHAR},
</if>
<if test="record.pathName != null" >
path_name = #{record.pathName,jdbcType=VARCHAR},
</if>
<if test="record.status != null" >
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.createAccount != null" >
create_account = #{record.createAccount,jdbcType=VARCHAR},
</if>
<if test="record.modifyTime != null" >
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="record.modifyAccount != null" >
modify_account = #{record.modifyAccount,jdbcType=VARCHAR},
</if>
<if test="record.msg != null" >
msg = #{record.msg,jdbcType=VARCHAR},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update t_warehouse_leven
set id = #{record.id,jdbcType=INTEGER},
appkey = #{record.appkey,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
parent_id = #{record.parentId,jdbcType=INTEGER},
seq = #{record.seq,jdbcType=INTEGER},
path_code = #{record.pathCode,jdbcType=VARCHAR},
path_name = #{record.pathName,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_account = #{record.createAccount,jdbcType=VARCHAR},
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
modify_account = #{record.modifyAccount,jdbcType=VARCHAR},
msg = #{record.msg,jdbcType=VARCHAR}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" >
update t_warehouse_leven
<set >
<if test="appkey != null" >
appkey = #{appkey,jdbcType=VARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="parentId != null" >
parent_id = #{parentId,jdbcType=INTEGER},
</if>
<if test="seq != null" >
seq = #{seq,jdbcType=INTEGER},
</if>
<if test="pathCode != null" >
path_code = #{pathCode,jdbcType=VARCHAR},
</if>
<if test="pathName != null" >
path_name = #{pathName,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null" >
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="modifyAccount != null" >
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="msg != null" >
msg = #{msg,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven" >
update t_warehouse_leven
set appkey = #{appkey,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
parent_id = #{parentId,jdbcType=INTEGER},
seq = #{seq,jdbcType=INTEGER},
path_code = #{pathCode,jdbcType=VARCHAR},
path_name = #{pathName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
msg = #{msg,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.extdb.WarehouseMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.Warehouse" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="warehouse_leven_id" property="warehouseLevenId" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="area" property="area" jdbcType="VARCHAR" />
<result column="service_provider" property="serviceProvider" jdbcType="VARCHAR" />
<result column="warehouse_attribution" property="warehouseAttribution" jdbcType="VARCHAR" />
<result column="msg" property="msg" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="create_account" property="createAccount" jdbcType="VARCHAR" />
<result column="modify_account" property="modifyAccount" jdbcType="VARCHAR" />
<result column="modify_time" property="modifyTime" jdbcType="TIMESTAMP" />
<result column="appkey" property="appkey" jdbcType="VARCHAR" />
<result column="is_enabled" property="isEnabled" jdbcType="INTEGER" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
id, warehouse_leven_id, name, area, service_provider, warehouse_attribution, msg,
status, create_time, create_account, modify_account, modify_time, appkey, is_enabled
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseCriteria" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from t_warehouse
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from t_warehouse
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from t_warehouse
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseCriteria" >
delete from t_warehouse
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.Warehouse" >
insert into t_warehouse (id, warehouse_leven_id, name,
area, service_provider, warehouse_attribution,
msg, status, create_time,
create_account, modify_account, modify_time,
appkey, is_enabled)
values (#{id,jdbcType=VARCHAR}, #{warehouseLevenId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{area,jdbcType=VARCHAR}, #{serviceProvider,jdbcType=VARCHAR}, #{warehouseAttribution,jdbcType=VARCHAR},
#{msg,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{createAccount,jdbcType=VARCHAR}, #{modifyAccount,jdbcType=VARCHAR}, #{modifyTime,jdbcType=TIMESTAMP},
#{appkey,jdbcType=VARCHAR}, #{isEnabled,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Warehouse" >
insert into t_warehouse
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="warehouseLevenId != null" >
warehouse_leven_id,
</if>
<if test="name != null" >
name,
</if>
<if test="area != null" >
area,
</if>
<if test="serviceProvider != null" >
service_provider,
</if>
<if test="warehouseAttribution != null" >
warehouse_attribution,
</if>
<if test="msg != null" >
msg,
</if>
<if test="status != null" >
status,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="createAccount != null" >
create_account,
</if>
<if test="modifyAccount != null" >
modify_account,
</if>
<if test="modifyTime != null" >
modify_time,
</if>
<if test="appkey != null" >
appkey,
</if>
<if test="isEnabled != null" >
is_enabled,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="warehouseLevenId != null" >
#{warehouseLevenId,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="area != null" >
#{area,jdbcType=VARCHAR},
</if>
<if test="serviceProvider != null" >
#{serviceProvider,jdbcType=VARCHAR},
</if>
<if test="warehouseAttribution != null" >
#{warehouseAttribution,jdbcType=VARCHAR},
</if>
<if test="msg != null" >
#{msg,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null" >
#{createAccount,jdbcType=VARCHAR},
</if>
<if test="modifyAccount != null" >
#{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
#{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="appkey != null" >
#{appkey,jdbcType=VARCHAR},
</if>
<if test="isEnabled != null" >
#{isEnabled,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseCriteria" resultType="java.lang.Integer" >
select count(*) from t_warehouse
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update t_warehouse
<set >
<if test="record.id != null" >
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.warehouseLevenId != null" >
warehouse_leven_id = #{record.warehouseLevenId,jdbcType=VARCHAR},
</if>
<if test="record.name != null" >
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.area != null" >
area = #{record.area,jdbcType=VARCHAR},
</if>
<if test="record.serviceProvider != null" >
service_provider = #{record.serviceProvider,jdbcType=VARCHAR},
</if>
<if test="record.warehouseAttribution != null" >
warehouse_attribution = #{record.warehouseAttribution,jdbcType=VARCHAR},
</if>
<if test="record.msg != null" >
msg = #{record.msg,jdbcType=VARCHAR},
</if>
<if test="record.status != null" >
status = #{record.status,jdbcType=INTEGER},
</if>
<if test="record.createTime != null" >
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.createAccount != null" >
create_account = #{record.createAccount,jdbcType=VARCHAR},
</if>
<if test="record.modifyAccount != null" >
modify_account = #{record.modifyAccount,jdbcType=VARCHAR},
</if>
<if test="record.modifyTime != null" >
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="record.appkey != null" >
appkey = #{record.appkey,jdbcType=VARCHAR},
</if>
<if test="record.isEnabled != null" >
is_enabled = #{record.isEnabled,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update t_warehouse
set id = #{record.id,jdbcType=VARCHAR},
warehouse_leven_id = #{record.warehouseLevenId,jdbcType=VARCHAR},
name = #{record.name,jdbcType=VARCHAR},
area = #{record.area,jdbcType=VARCHAR},
service_provider = #{record.serviceProvider,jdbcType=VARCHAR},
warehouse_attribution = #{record.warehouseAttribution,jdbcType=VARCHAR},
msg = #{record.msg,jdbcType=VARCHAR},
status = #{record.status,jdbcType=INTEGER},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
create_account = #{record.createAccount,jdbcType=VARCHAR},
modify_account = #{record.modifyAccount,jdbcType=VARCHAR},
modify_time = #{record.modifyTime,jdbcType=TIMESTAMP},
appkey = #{record.appkey,jdbcType=VARCHAR},
is_enabled = #{record.isEnabled,jdbcType=INTEGER}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.Warehouse" >
update t_warehouse
<set >
<if test="warehouseLevenId != null" >
warehouse_leven_id = #{warehouseLevenId,jdbcType=VARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="area != null" >
area = #{area,jdbcType=VARCHAR},
</if>
<if test="serviceProvider != null" >
service_provider = #{serviceProvider,jdbcType=VARCHAR},
</if>
<if test="warehouseAttribution != null" >
warehouse_attribution = #{warehouseAttribution,jdbcType=VARCHAR},
</if>
<if test="msg != null" >
msg = #{msg,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="createAccount != null" >
create_account = #{createAccount,jdbcType=VARCHAR},
</if>
<if test="modifyAccount != null" >
modify_account = #{modifyAccount,jdbcType=VARCHAR},
</if>
<if test="modifyTime != null" >
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
</if>
<if test="appkey != null" >
appkey = #{appkey,jdbcType=VARCHAR},
</if>
<if test="isEnabled != null" >
is_enabled = #{isEnabled,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.Warehouse" >
update t_warehouse
set warehouse_leven_id = #{warehouseLevenId,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
area = #{area,jdbcType=VARCHAR},
service_provider = #{serviceProvider,jdbcType=VARCHAR},
warehouse_attribution = #{warehouseAttribution,jdbcType=VARCHAR},
msg = #{msg,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
create_account = #{createAccount,jdbcType=VARCHAR},
modify_account = #{modifyAccount,jdbcType=VARCHAR},
modify_time = #{modifyTime,jdbcType=TIMESTAMP},
appkey = #{appkey,jdbcType=VARCHAR},
is_enabled = #{isEnabled,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.extdb.WarehouseMapperEx">
<select id="getWarehouseLevenByNameCount" resultType="integer">
SELECT
count( 1 )
FROM
t_warehouse_leven
WHERE
`status` = 1
<if test="parentId != null and parentId != ''">
AND parent_id = #{parentId}
</if>
<if test="id != null and id != ''">
and id != #{id}
</if>
AND NAME = #{name}
</select>
<select id="getWarehouseLevenParentLastId" parameterType="integer" resultType="integer">
SELECT
IFNULL( max( id ), 0 ) + 1
FROM
t_warehouse_leven
</select>
<select id="getWarehouseLevenParentSeq" parameterType="integer" resultType="integer">
SELECT
IFNULL( max( seq ), 0 ) + 1
FROM
t_warehouse_leven
WHERE
parent_id = #{parentId}
and status = 1
</select>
<select id="qryWarehouseLevenById" resultType="map">
select
id,
name,
parent_id parentId
from
t_warehouse_leven
where
status = 1
and id = #{parentId}
limit 1
</select>
<insert id="insertWarehouseLeven" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven">
INSERT INTO t_warehouse_leven(id,appkey,name,parent_id,seq,path_code,path_name,status,create_time,create_account,modify_time,modify_account,msg)
values (
#{id},#{appkey},#{name},#{parentId},#{seq},#{pathCode},#{pathName},#{status},#{createTime},#{createAccount},#{modifyTime},#{modifyAccount},#{msg}
)
ON DUPLICATE KEY UPDATE parent_id = values(parent_id),seq = values(seq),name = values(name),path_code = values(path_code),path_name=values(path_name),msg=values(msg)
</insert>
<insert id="insertWarehouse" parameterType="com.boco.nbd.wios.manage.entity.bo.Warehouse">
insert into t_warehouse(id,appkey,warehouse_leven_id,name,area,service_provider,warehouse_attribution,msg,status,create_time,create_account,modify_account,modify_time,is_enabled)
values (#{id},#{appkey},#{warehouseLevenId},#{name},#{area},#{serviceProvider},#{warehouseAttribution},#{msg},#{status},#{createTime},#{createAccount},#{modifyAccount},#{modifyTime},#{isEnabled})
ON DUPLICATE KEY UPDATE warehouse_leven_id = values(warehouse_leven_id),name = values(name),area=values(area),service_provider = values(service_provider),warehouse_attribution = values(warehouse_attribution),msg = values(msg),is_enabled = values(is_enabled)
</insert>
<select id="qryWarehouseList" parameterType="string" resultType="com.boco.nbd.wios.manage.entity.bo.WarehouseEx">
select
tw.id,
tw.appkey,
warehouse_leven_id,
tw.name,
tw.area,
tw.service_provider,
tw.warehouse_attribution,
tw.msg,
tw.status,
tw.is_enabled,
tw.create_time,
tw.create_account,
tw.modify_account,
tw.modify_time,
twl.parent_id parentId,
twl.path_code pathCode,
twl.path_name pathName
from
t_warehouse tw
LEFT JOIN t_warehouse_leven twl on tw.warehouse_leven_id = twl.id
where
tw.status = 1
and twl.`status` = 1
and tw.appkey = #{appkey}
<if test="id != null and id != ''">
and tw.id = #{id}
</if>
<if test="isEnable != null">
and tw.is_enabled = #{isEnable}
</if>
<if test="serviceProviders != null and serviceProviders.size() > 0">
and tw.service_provider in
<foreach collection="serviceProviders" item="item" index="index"
open="(" close=")" separator=",">
#{item}
</foreach>
</if>
<if test="area != null and area != ''">
and tw.area = #{area}
</if>
<if test="warehouseAttribution != null and warehouseAttribution != ''">
and tw.warehouse_attribution = #{warehouseAttribution}
</if>
<if test="name != null and name != ''">
and tw.name like CONCAT('%',#{name},'%')
</if>
<if test="warehouseLevenId != null and warehouseLevenId != '' ">
and tw.warehouse_leven_id = #{warehouseLevenId}
</if>
order by tw.create_time desc
</select>
<select id="qryWarehouseLeven" resultType="com.boco.nbd.wios.manage.entity.bo.WarehouseLeven">
SELECT
twl.id,
twl.name,
twl.parent_id,
twl.seq,
twl.msg,
twl.path_name,
twl.path_code
FROM
t_warehouse_leven twl
LEFT JOIN t_warehouse tw on tw.warehouse_leven_id = twl.id
WHERE
twl.`status` = 1
and twl.appkey = #{appkey}
<if test="serviceProvider != null and serviceProvider != '' and serviceProvider != 'null'">
and tw.service_provider = #{serviceProvider}
</if>
<if test="parentId != null">
and twl.parent_id = #{parentId}
</if>
<if test="id != null">
and twl.id = #{id}
</if>
<if test="name != null and name != ''">
and twl.name like CONCAT('%',#{name},'%')
</if>
GROUP BY twl.id
</select>
<update id="updateWarehouseisEnabled">
update
t_warehouse
set
is_enabled = #{isEnabled}
where id = #{id}
</update>
</mapper>
\ No newline at end of file
<?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.boco.nbd.wios.manage.mapper.extdb.WarehouseMaterialsMapper" >
<resultMap id="BaseResultMap" type="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterials" >
<id column="materials_id" property="materialsId" jdbcType="VARCHAR" />
<id column="warehouse_id" property="warehouseId" jdbcType="VARCHAR" />
<result column="total_number" property="totalNumber" jdbcType="DECIMAL" />
<result column="has_number" property="hasNumber" jdbcType="DECIMAL" />
<result column="remaining_number" property="remainingNumber" jdbcType="DECIMAL" />
<result column="stay_with_number" property="stayWithNumber" jdbcType="DECIMAL" />
</resultMap>
<sql id="Example_Where_Clause" >
<where >
<foreach collection="oredCriteria" item="criteria" separator="or" >
<if test="criteria.valid" >
<trim prefix="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" 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="(" suffix=")" prefixOverrides="and" >
<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 collection="criterion.value" item="listItem" open="(" close=")" separator="," >
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List" >
materials_id, warehouse_id, total_number, has_number, remaining_number, stay_with_number
</sql>
<select id="selectByExample" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterialsCriteria" >
select
<if test="distinct" >
distinct
</if>
<include refid="Base_Column_List" />
from t_warehouse_materials
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null" >
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterialsKey" >
select
<include refid="Base_Column_List" />
from t_warehouse_materials
where materials_id = #{materialsId,jdbcType=VARCHAR}
and warehouse_id = #{warehouseId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterialsKey" >
delete from t_warehouse_materials
where materials_id = #{materialsId,jdbcType=VARCHAR}
and warehouse_id = #{warehouseId,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterialsCriteria" >
delete from t_warehouse_materials
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterials" >
insert into t_warehouse_materials (materials_id, warehouse_id, total_number,
has_number, remaining_number, stay_with_number
)
values (#{materialsId,jdbcType=VARCHAR}, #{warehouseId,jdbcType=VARCHAR}, #{totalNumber,jdbcType=DECIMAL},
#{hasNumber,jdbcType=DECIMAL}, #{remainingNumber,jdbcType=DECIMAL}, #{stayWithNumber,jdbcType=DECIMAL}
)
</insert>
<insert id="insertSelective" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterials" >
insert into t_warehouse_materials
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="materialsId != null" >
materials_id,
</if>
<if test="warehouseId != null" >
warehouse_id,
</if>
<if test="totalNumber != null" >
total_number,
</if>
<if test="hasNumber != null" >
has_number,
</if>
<if test="remainingNumber != null" >
remaining_number,
</if>
<if test="stayWithNumber != null" >
stay_with_number,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="materialsId != null" >
#{materialsId,jdbcType=VARCHAR},
</if>
<if test="warehouseId != null" >
#{warehouseId,jdbcType=VARCHAR},
</if>
<if test="totalNumber != null" >
#{totalNumber,jdbcType=DECIMAL},
</if>
<if test="hasNumber != null" >
#{hasNumber,jdbcType=DECIMAL},
</if>
<if test="remainingNumber != null" >
#{remainingNumber,jdbcType=DECIMAL},
</if>
<if test="stayWithNumber != null" >
#{stayWithNumber,jdbcType=DECIMAL},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterialsCriteria" resultType="java.lang.Integer" >
select count(*) from t_warehouse_materials
<if test="_parameter != null" >
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map" >
update t_warehouse_materials
<set >
<if test="record.materialsId != null" >
materials_id = #{record.materialsId,jdbcType=VARCHAR},
</if>
<if test="record.warehouseId != null" >
warehouse_id = #{record.warehouseId,jdbcType=VARCHAR},
</if>
<if test="record.totalNumber != null" >
total_number = #{record.totalNumber,jdbcType=DECIMAL},
</if>
<if test="record.hasNumber != null" >
has_number = #{record.hasNumber,jdbcType=DECIMAL},
</if>
<if test="record.remainingNumber != null" >
remaining_number = #{record.remainingNumber,jdbcType=DECIMAL},
</if>
<if test="record.stayWithNumber != null" >
stay_with_number = #{record.stayWithNumber,jdbcType=DECIMAL},
</if>
</set>
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map" >
update t_warehouse_materials
set materials_id = #{record.materialsId,jdbcType=VARCHAR},
warehouse_id = #{record.warehouseId,jdbcType=VARCHAR},
total_number = #{record.totalNumber,jdbcType=DECIMAL},
has_number = #{record.hasNumber,jdbcType=DECIMAL},
remaining_number = #{record.remainingNumber,jdbcType=DECIMAL},
stay_with_number = #{record.stayWithNumber,jdbcType=DECIMAL}
<if test="_parameter != null" >
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterials" >
update t_warehouse_materials
<set >
<if test="totalNumber != null" >
total_number = #{totalNumber,jdbcType=DECIMAL},
</if>
<if test="hasNumber != null" >
has_number = #{hasNumber,jdbcType=DECIMAL},
</if>
<if test="remainingNumber != null" >
remaining_number = #{remainingNumber,jdbcType=DECIMAL},
</if>
<if test="stayWithNumber != null" >
stay_with_number = #{stayWithNumber,jdbcType=DECIMAL},
</if>
</set>
where materials_id = #{materialsId,jdbcType=VARCHAR}
and warehouse_id = #{warehouseId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.boco.nbd.wios.manage.entity.bo.WarehouseMaterials" >
update t_warehouse_materials
set total_number = #{totalNumber,jdbcType=DECIMAL},
has_number = #{hasNumber,jdbcType=DECIMAL},
remaining_number = #{remainingNumber,jdbcType=DECIMAL},
stay_with_number = #{stayWithNumber,jdbcType=DECIMAL}
where materials_id = #{materialsId,jdbcType=VARCHAR}
and warehouse_id = #{warehouseId,jdbcType=VARCHAR}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<settings>
<setting name="logImpl" value="SLF4J"/>
<setting name="callSettersOnNulls" value="true"/>
<setting name="cacheEnabled" value="true"/>
<setting name="lazyLoadingEnabled" value="true"/>
<setting name="aggressiveLazyLoading" value="true"/>
<setting name="multipleResultSetsEnabled" value="true"/>
<setting name="useColumnLabel" value="true"/>
<setting name="useGeneratedKeys" value="false"/>
<setting name="autoMappingBehavior" value="PARTIAL"/>
<setting name="defaultExecutorType" value="SIMPLE"/>
<setting name="mapUnderscoreToCamelCase" value="true"/>
<setting name="localCacheScope" value="SESSION"/>
<setting name="jdbcTypeForNull" value="NULL"/>
<setting name="defaultFetchSize" value="1000"/>
</settings>
<typeAliases>
<typeAlias alias="Float" type="java.lang.Float"/>
<typeAlias alias="Double" type="java.lang.Double"/>
<typeAlias alias="String" type="java.lang.String"/>
<typeAlias alias="Integer" type="java.lang.Integer"/>
<typeAlias alias="Long" type="java.lang.Long"/>
<typeAlias alias="HashMap" type="java.util.HashMap"/>
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap"/>
<typeAlias alias="ArrayList" type="java.util.ArrayList"/>
<typeAlias alias="LinkedList" type="java.util.LinkedList"/>
</typeAliases>
</configuration>
\ No newline at end of file
####################################################################################
pay.ali.paymentType=1
pay.ali.notifyUrl=payNotify.do
pay.ali.returnUrl=payReturn.do
pay.ali.key=
####################################ali WAP####################################
pay.ali.wap.notifyUrl=payWAPNotify.do
pay.ali.wap.returnUrl=payWAPReturn.do
#RSA\u65b9\u5f0f
pay.ali.wap.signType=0001
pay.ali.wap.key=0001
pay.ali.wap.privateKey=
pay.ali.wap.aliPublicKey=
####################################weixin pay####################################
pay.weixin.keystore=
pay.weixin.appid=wx45520dce6ed44fd8
pay.weixin.mchId=1604206888
pay.weixin.key=camsnetec2020xxxcamsnetec2020xxx
pay.weixin.notifyUrl=weixin.pay.notify.do
#!/bin/bash
jar_name="nbd-wios-manage-2.0.0.jar"
#server_port="30350"
nacos_server_addr="10.12.1.17:8848"
nacos_server_namespace="ce18ccbc-e054-45ad-893f-ed7ebee1704b"
jar_pid=`ps -ef|grep -v grep | grep ${jar_name}|awk '{ print $2 }'`
echo "$jar_pid"
if [ ! -n "$jar_pid" ]; then
echo "${jar_name} will redeploy."
else
kill -9 $jar_pid
echo "kill ${jar_pid}"
fi
#jar opt
# -xms:default value physical memory/64
# -Xmx:default value physical memory/4
# -Xmn:default value -xms/3
jar_opt="-Xms512m -Xmx2048m -Xmn256m -XX:MetaspaceSize=128M"
jar_opt="${jar_opt} -Xloggc:./logs/gc.vgc"
jar_opt="${jar_opt} -XX:-OmitStackTraceInFastThrow"
# local param
#jar_opt="${jar_opt} -Dspring.profiles.active=pro"
# log
#jar_opt="${jar_opt} -Dlog.home=../logs"
# server.port
#jar_opt="${jar_opt} -Dserver.port=${server_port}"
# naocs
jar_opt="${jar_opt} -Dnacos-server-addr=${nacos_server_addr} -Dnacos-server-namespace=${nacos_server_namespace}"
# start
rm -rf nohup.out
nohup java ${jar_opt} -jar $jar_name &
echo "${jar_name} start success."
\ No newline at end of file
#!/bin/bash
jar_name="nbd-wios-manage-2.0.0.jar"
jar_pid=`ps -ef|grep -v grep | grep ${jar_name}|awk '{ print $2 }'`
echo $jar_pid
if [ ! -n "$jar_pid" ]; then
echo "${jar_name} is stopped."
else
kill -9 $jar_pid
echo "kill ${jar_pid}"
echo "${jar_name} is stopped."
fi
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论