| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007 |
- <?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.chinaitop.depot.business.mapper.BusinessPlanMapper" >
- <resultMap id="BaseResultMap" type="com.chinaitop.depot.business.model.BusinessPlan" >
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Jun 29 18:21:02 CST 2020.
- -->
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="plan_number" property="planNumber" jdbcType="VARCHAR" />
- <result column="plan_title" property="planTitle" jdbcType="VARCHAR" />
- <result column="reference_number" property="referenceNumber" jdbcType="VARCHAR" />
- <result column="plan_desc" property="planDesc" jdbcType="VARCHAR" />
- <result column="execute_type" property="executeType" jdbcType="INTEGER" />
- <result column="out_amount" property="outAmount" jdbcType="VARCHAR" />
- <result column="in_amount" property="inAmount" jdbcType="VARCHAR" />
- <result column="out_total_price" property="outTotalPrice" jdbcType="VARCHAR" />
- <result column="in_total_price" property="inTotalPrice" jdbcType="VARCHAR" />
- <result column="customer_plan_state" property="customerPlanState" jdbcType="VARCHAR" />
- <result column="plan_customer" property="planCustomer" jdbcType="VARCHAR" />
- <result column="audit_state" property="auditState" jdbcType="VARCHAR" />
- <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
- <result column="process_definition_id" property="processDefinitionId" jdbcType="VARCHAR" />
- <result column="current_approve_path" property="currentApprovePath" jdbcType="VARCHAR" />
- <result column="agree_time" property="agreeTime" jdbcType="TIMESTAMP" />
- <result column="creater_id" property="createrId" jdbcType="INTEGER" />
- <result column="creater" property="creater" jdbcType="VARCHAR" />
- <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
- <result column="create_unit" property="createUnit" jdbcType="VARCHAR" />
- <result column="org_id" property="orgId" jdbcType="INTEGER" />
- <result column="in_application" property="inApplication" jdbcType="INTEGER" />
- <result column="total_quantity" property="totalQuantity" jdbcType="VARCHAR" />
- <result column="report_date" property="reportDate" jdbcType="TIMESTAMP" />
- <result column="send_date" property="sendDate" jdbcType="TIMESTAMP" />
- <result column="province_remark" property="provinceRemark" jdbcType="VARCHAR" />
- <result column="enterprise_remark" property="enterpriseRemark" jdbcType="VARCHAR" />
- <result column="attribute_type" property="attributeType" jdbcType="INTEGER" />
- <result column="refuse_reason" property="refuseReason" jdbcType="VARCHAR" />
- <result column="updatetime" property="updatetime" jdbcType="TIMESTAMP" />
- <result column="kszxrq" property="kszxrq" jdbcType="TIMESTAMP" />
- <result column="jzzxrq" property="jzzxrq" jdbcType="TIMESTAMP" />
- <result column="jhnd" property="jhnd" jdbcType="VARCHAR" />
- </resultMap>
-
- <resultMap id="approvalResultMap" type="com.chinaitop.depot.business.model.vo.BusinessPlanAuditVO" extends="BaseResultMap">
-
- <result column="process_instance_id" property="processInstanceId" jdbcType="VARCHAR" />
-
- <result column="task_id" property="taskId" jdbcType="VARCHAR" />
-
- <result column="result" property="result" jdbcType="VARCHAR" />
-
- <result column="task_name" property="taskName" jdbcType="VARCHAR" />
-
- <result column="auditId" property="auditId" jdbcType="INTEGER" />
-
- <result column="applicationDate" property="applicationDate" jdbcType="VARCHAR" />
-
- <result column="acceptanceType" property="acceptanceType" jdbcType="VARCHAR" />
-
- <result column="house_id" property="houseId" jdbcType="INTEGER" />
-
- <result column="warehouse_id" property="warehouseId" jdbcType="INTEGER" />
-
- </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 Jun 29 18:21:02 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 Jun 29 18:21:02 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 Jun 29 18:21:02 CST 2020.
- -->
- id, plan_number, plan_title, reference_number, plan_desc, execute_type, out_amount,
- in_amount, out_total_price, in_total_price, customer_plan_state, plan_customer, audit_state,
- process_instance_id, process_definition_id, current_approve_path, agree_time, creater_id,
- creater, create_time, create_unit, org_id, in_application, total_quantity, report_date,
- send_date, province_remark, enterprise_remark, attribute_type, refuse_reason, updatetime,
- kszxrq, jzzxrq, jhnd
- </sql>
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" >
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Jun 29 18:21:02 CST 2020.
- -->
- select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- from business_plan
- <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 Jun 29 18:21:02 CST 2020.
- -->
- select
- <include refid="Base_Column_List" />
- from business_plan
- 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 Jun 29 18:21:02 CST 2020.
- -->
- delete from business_plan
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <delete id="deleteByExample" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" >
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Jun 29 18:21:02 CST 2020.
- -->
- delete from business_plan
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </delete>
- <insert id="insert" useGeneratedKeys="true" keyProperty="id" parameterType="com.chinaitop.depot.business.model.BusinessPlan" >
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Jun 29 18:21:02 CST 2020.
- -->
- insert into business_plan (id, plan_number, plan_title,
- reference_number, plan_desc, execute_type,
- out_amount, in_amount, out_total_price,
- in_total_price, customer_plan_state, plan_customer,
- audit_state, process_instance_id, process_definition_id,
- current_approve_path, agree_time, creater_id,
- creater, create_time, create_unit,
- org_id, in_application, total_quantity,
- report_date, send_date, province_remark,
- enterprise_remark, attribute_type, refuse_reason,
- updatetime, kszxrq, jzzxrq,
- jhnd)
- values (#{id,jdbcType=INTEGER}, #{planNumber,jdbcType=VARCHAR}, #{planTitle,jdbcType=VARCHAR},
- #{referenceNumber,jdbcType=VARCHAR}, #{planDesc,jdbcType=VARCHAR}, #{executeType,jdbcType=INTEGER},
- #{outAmount,jdbcType=VARCHAR}, #{inAmount,jdbcType=VARCHAR}, #{outTotalPrice,jdbcType=VARCHAR},
- #{inTotalPrice,jdbcType=VARCHAR}, #{customerPlanState,jdbcType=VARCHAR}, #{planCustomer,jdbcType=VARCHAR},
- #{auditState,jdbcType=VARCHAR}, #{processInstanceId,jdbcType=VARCHAR}, #{processDefinitionId,jdbcType=VARCHAR},
- #{currentApprovePath,jdbcType=VARCHAR}, #{agreeTime,jdbcType=TIMESTAMP}, #{createrId,jdbcType=INTEGER},
- #{creater,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{createUnit,jdbcType=VARCHAR},
- #{orgId,jdbcType=INTEGER}, #{inApplication,jdbcType=INTEGER}, #{totalQuantity,jdbcType=VARCHAR},
- #{reportDate,jdbcType=TIMESTAMP}, #{sendDate,jdbcType=TIMESTAMP}, #{provinceRemark,jdbcType=VARCHAR},
- #{enterpriseRemark,jdbcType=VARCHAR}, #{attributeType,jdbcType=INTEGER}, #{refuseReason,jdbcType=VARCHAR},
- #{updatetime,jdbcType=TIMESTAMP}, #{kszxrq,jdbcType=TIMESTAMP}, #{jzzxrq,jdbcType=TIMESTAMP},
- #{jhnd,jdbcType=VARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.chinaitop.depot.business.model.BusinessPlan" >
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Jun 29 18:21:02 CST 2020.
- -->
- insert into business_plan
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- id,
- </if>
- <if test="planNumber != null" >
- plan_number,
- </if>
- <if test="planTitle != null" >
- plan_title,
- </if>
- <if test="referenceNumber != null" >
- reference_number,
- </if>
- <if test="planDesc != null" >
- plan_desc,
- </if>
- <if test="executeType != null" >
- execute_type,
- </if>
- <if test="outAmount != null" >
- out_amount,
- </if>
- <if test="inAmount != null" >
- in_amount,
- </if>
- <if test="outTotalPrice != null" >
- out_total_price,
- </if>
- <if test="inTotalPrice != null" >
- in_total_price,
- </if>
- <if test="customerPlanState != null" >
- customer_plan_state,
- </if>
- <if test="planCustomer != null" >
- plan_customer,
- </if>
- <if test="auditState != null" >
- audit_state,
- </if>
- <if test="processInstanceId != null" >
- process_instance_id,
- </if>
- <if test="processDefinitionId != null" >
- process_definition_id,
- </if>
- <if test="currentApprovePath != null" >
- current_approve_path,
- </if>
- <if test="agreeTime != null" >
- agree_time,
- </if>
- <if test="createrId != null" >
- creater_id,
- </if>
- <if test="creater != null" >
- creater,
- </if>
- <if test="createTime != null" >
- create_time,
- </if>
- <if test="createUnit != null" >
- create_unit,
- </if>
- <if test="orgId != null" >
- org_id,
- </if>
- <if test="inApplication != null" >
- in_application,
- </if>
- <if test="totalQuantity != null" >
- total_quantity,
- </if>
- <if test="reportDate != null" >
- report_date,
- </if>
- <if test="sendDate != null" >
- send_date,
- </if>
- <if test="provinceRemark != null" >
- province_remark,
- </if>
- <if test="enterpriseRemark != null" >
- enterprise_remark,
- </if>
- <if test="attributeType != null" >
- attribute_type,
- </if>
- <if test="refuseReason != null" >
- refuse_reason,
- </if>
- <if test="updatetime != null" >
- updatetime,
- </if>
- <if test="kszxrq != null" >
- kszxrq,
- </if>
- <if test="jzzxrq != null" >
- jzzxrq,
- </if>
- <if test="jhnd != null" >
- jhnd,
- </if>
-
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="id != null" >
- #{id,jdbcType=INTEGER},
- </if>
- <if test="planNumber != null" >
- #{planNumber,jdbcType=VARCHAR},
- </if>
- <if test="planTitle != null" >
- #{planTitle,jdbcType=VARCHAR},
- </if>
- <if test="referenceNumber != null" >
- #{referenceNumber,jdbcType=VARCHAR},
- </if>
- <if test="planDesc != null" >
- #{planDesc,jdbcType=VARCHAR},
- </if>
- <if test="executeType != null" >
- #{executeType,jdbcType=INTEGER},
- </if>
- <if test="outAmount != null" >
- #{outAmount,jdbcType=VARCHAR},
- </if>
- <if test="inAmount != null" >
- #{inAmount,jdbcType=VARCHAR},
- </if>
- <if test="outTotalPrice != null" >
- #{outTotalPrice,jdbcType=VARCHAR},
- </if>
- <if test="inTotalPrice != null" >
- #{inTotalPrice,jdbcType=VARCHAR},
- </if>
- <if test="customerPlanState != null" >
- #{customerPlanState,jdbcType=VARCHAR},
- </if>
- <if test="planCustomer != null" >
- #{planCustomer,jdbcType=VARCHAR},
- </if>
- <if test="auditState != null" >
- #{auditState,jdbcType=VARCHAR},
- </if>
- <if test="processInstanceId != null" >
- #{processInstanceId,jdbcType=VARCHAR},
- </if>
- <if test="processDefinitionId != null" >
- #{processDefinitionId,jdbcType=VARCHAR},
- </if>
- <if test="currentApprovePath != null" >
- #{currentApprovePath,jdbcType=VARCHAR},
- </if>
- <if test="agreeTime != null" >
- #{agreeTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createrId != null" >
- #{createrId,jdbcType=INTEGER},
- </if>
- <if test="creater != null" >
- #{creater,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createUnit != null" >
- #{createUnit,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null" >
- #{orgId,jdbcType=INTEGER},
- </if>
- <if test="inApplication != null" >
- #{inApplication,jdbcType=INTEGER},
- </if>
- <if test="totalQuantity != null" >
- #{totalQuantity,jdbcType=VARCHAR},
- </if>
- <if test="reportDate != null" >
- #{reportDate,jdbcType=TIMESTAMP},
- </if>
- <if test="sendDate != null" >
- #{sendDate,jdbcType=TIMESTAMP},
- </if>
- <if test="provinceRemark != null" >
- #{provinceRemark,jdbcType=VARCHAR},
- </if>
- <if test="enterpriseRemark != null" >
- #{enterpriseRemark,jdbcType=VARCHAR},
- </if>
- <if test="attributeType != null" >
- #{attributeType,jdbcType=INTEGER},
- </if>
- <if test="refuseReason != null" >
- #{refuseReason,jdbcType=VARCHAR},
- </if>
- <if test="updatetime != null" >
- #{updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="kszxrq != null" >
- #{kszxrq,jdbcType=TIMESTAMP},
- </if>
- <if test="jzzxrq != null" >
- #{jzzxrq,jdbcType=TIMESTAMP},
- </if>
- <if test="jhnd != null" >
- #{jhnd,jdbcType=VARCHAR},
- </if>
-
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" resultType="java.lang.Integer" >
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Jun 29 18:21:02 CST 2020.
- -->
- select count(*) from business_plan
- <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 Jun 29 18:21:02 CST 2020.
- -->
- update business_plan
- <set >
- <if test="record.id != null" >
- id = #{record.id,jdbcType=INTEGER},
- </if>
- <if test="record.planNumber != null" >
- plan_number = #{record.planNumber,jdbcType=VARCHAR},
- </if>
- <if test="record.planTitle != null" >
- plan_title = #{record.planTitle,jdbcType=VARCHAR},
- </if>
- <if test="record.referenceNumber != null" >
- reference_number = #{record.referenceNumber,jdbcType=VARCHAR},
- </if>
- <if test="record.planDesc != null" >
- plan_desc = #{record.planDesc,jdbcType=VARCHAR},
- </if>
- <if test="record.executeType != null" >
- execute_type = #{record.executeType,jdbcType=INTEGER},
- </if>
- <if test="record.outAmount != null" >
- out_amount = #{record.outAmount,jdbcType=VARCHAR},
- </if>
- <if test="record.inAmount != null" >
- in_amount = #{record.inAmount,jdbcType=VARCHAR},
- </if>
- <if test="record.outTotalPrice != null" >
- out_total_price = #{record.outTotalPrice,jdbcType=VARCHAR},
- </if>
- <if test="record.inTotalPrice != null" >
- in_total_price = #{record.inTotalPrice,jdbcType=VARCHAR},
- </if>
- <if test="record.customerPlanState != null" >
- customer_plan_state = #{record.customerPlanState,jdbcType=VARCHAR},
- </if>
- <if test="record.planCustomer != null" >
- plan_customer = #{record.planCustomer,jdbcType=VARCHAR},
- </if>
- <if test="record.auditState != null" >
- audit_state = #{record.auditState,jdbcType=VARCHAR},
- </if>
- <if test="record.processInstanceId != null" >
- process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
- </if>
- <if test="record.processDefinitionId != null" >
- process_definition_id = #{record.processDefinitionId,jdbcType=VARCHAR},
- </if>
- <if test="record.currentApprovePath != null" >
- current_approve_path = #{record.currentApprovePath,jdbcType=VARCHAR},
- </if>
- <if test="record.agreeTime != null" >
- agree_time = #{record.agreeTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.createrId != null" >
- creater_id = #{record.createrId,jdbcType=INTEGER},
- </if>
- <if test="record.creater != null" >
- creater = #{record.creater,jdbcType=VARCHAR},
- </if>
- <if test="record.createTime != null" >
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.createUnit != null" >
- create_unit = #{record.createUnit,jdbcType=VARCHAR},
- </if>
- <if test="record.orgId != null" >
- org_id = #{record.orgId,jdbcType=INTEGER},
- </if>
- <if test="record.inApplication != null" >
- in_application = #{record.inApplication,jdbcType=INTEGER},
- </if>
- <if test="record.totalQuantity != null" >
- total_quantity = #{record.totalQuantity,jdbcType=VARCHAR},
- </if>
- <if test="record.reportDate != null" >
- report_date = #{record.reportDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.sendDate != null" >
- send_date = #{record.sendDate,jdbcType=TIMESTAMP},
- </if>
- <if test="record.provinceRemark != null" >
- province_remark = #{record.provinceRemark,jdbcType=VARCHAR},
- </if>
- <if test="record.enterpriseRemark != null" >
- enterprise_remark = #{record.enterpriseRemark,jdbcType=VARCHAR},
- </if>
- <if test="record.attributeType != null" >
- attribute_type = #{record.attributeType,jdbcType=INTEGER},
- </if>
- <if test="record.refuseReason != null" >
- refuse_reason = #{record.refuseReason,jdbcType=VARCHAR},
- </if>
- <if test="record.updatetime != null" >
- updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="record.kszxrq != null" >
- kszxrq = #{record.kszxrq,jdbcType=TIMESTAMP},
- </if>
- <if test="record.jzzxrq != null" >
- jzzxrq = #{record.jzzxrq,jdbcType=TIMESTAMP},
- </if>
- <if test="record.jhnd != null" >
- jhnd = #{record.jhnd,jdbcType=VARCHAR},
- </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 Jun 29 18:21:02 CST 2020.
- -->
- update business_plan
- set id = #{record.id,jdbcType=INTEGER},
- plan_number = #{record.planNumber,jdbcType=VARCHAR},
- plan_title = #{record.planTitle,jdbcType=VARCHAR},
- reference_number = #{record.referenceNumber,jdbcType=VARCHAR},
- plan_desc = #{record.planDesc,jdbcType=VARCHAR},
- execute_type = #{record.executeType,jdbcType=INTEGER},
- out_amount = #{record.outAmount,jdbcType=VARCHAR},
- in_amount = #{record.inAmount,jdbcType=VARCHAR},
- out_total_price = #{record.outTotalPrice,jdbcType=VARCHAR},
- in_total_price = #{record.inTotalPrice,jdbcType=VARCHAR},
- customer_plan_state = #{record.customerPlanState,jdbcType=VARCHAR},
- plan_customer = #{record.planCustomer,jdbcType=VARCHAR},
- audit_state = #{record.auditState,jdbcType=VARCHAR},
- process_instance_id = #{record.processInstanceId,jdbcType=VARCHAR},
- process_definition_id = #{record.processDefinitionId,jdbcType=VARCHAR},
- current_approve_path = #{record.currentApprovePath,jdbcType=VARCHAR},
- agree_time = #{record.agreeTime,jdbcType=TIMESTAMP},
- creater_id = #{record.createrId,jdbcType=INTEGER},
- creater = #{record.creater,jdbcType=VARCHAR},
- create_time = #{record.createTime,jdbcType=TIMESTAMP},
- create_unit = #{record.createUnit,jdbcType=VARCHAR},
- org_id = #{record.orgId,jdbcType=INTEGER},
- in_application = #{record.inApplication,jdbcType=INTEGER},
- total_quantity = #{record.totalQuantity,jdbcType=VARCHAR},
- report_date = #{record.reportDate,jdbcType=TIMESTAMP},
- send_date = #{record.sendDate,jdbcType=TIMESTAMP},
- province_remark = #{record.provinceRemark,jdbcType=VARCHAR},
- enterprise_remark = #{record.enterpriseRemark,jdbcType=VARCHAR},
- attribute_type = #{record.attributeType,jdbcType=INTEGER},
- refuse_reason = #{record.refuseReason,jdbcType=VARCHAR},
- updatetime = #{record.updatetime,jdbcType=TIMESTAMP},
- kszxrq = #{record.kszxrq,jdbcType=TIMESTAMP},
- jzzxrq = #{record.jzzxrq,jdbcType=TIMESTAMP},
- jhnd = #{record.jhnd,jdbcType=VARCHAR}
-
- <if test="_parameter != null" >
- <include refid="Update_By_Example_Where_Clause" />
- </if>
- </update>
- <update id="updateByPrimaryKeySelective" parameterType="com.chinaitop.depot.business.model.BusinessPlan" >
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Jun 29 18:21:02 CST 2020.
- -->
- update business_plan
- <set >
- <if test="planNumber != null" >
- plan_number = #{planNumber,jdbcType=VARCHAR},
- </if>
- <if test="planTitle != null" >
- plan_title = #{planTitle,jdbcType=VARCHAR},
- </if>
- <if test="referenceNumber != null" >
- reference_number = #{referenceNumber,jdbcType=VARCHAR},
- </if>
- <if test="planDesc != null" >
- plan_desc = #{planDesc,jdbcType=VARCHAR},
- </if>
- <if test="executeType != null" >
- execute_type = #{executeType,jdbcType=INTEGER},
- </if>
- <if test="outAmount != null" >
- out_amount = #{outAmount,jdbcType=VARCHAR},
- </if>
- <if test="inAmount != null" >
- in_amount = #{inAmount,jdbcType=VARCHAR},
- </if>
- <if test="outTotalPrice != null" >
- out_total_price = #{outTotalPrice,jdbcType=VARCHAR},
- </if>
- <if test="inTotalPrice != null" >
- in_total_price = #{inTotalPrice,jdbcType=VARCHAR},
- </if>
- <if test="customerPlanState != null" >
- customer_plan_state = #{customerPlanState,jdbcType=VARCHAR},
- </if>
- <if test="planCustomer != null" >
- plan_customer = #{planCustomer,jdbcType=VARCHAR},
- </if>
- <if test="auditState != null" >
- audit_state = #{auditState,jdbcType=VARCHAR},
- </if>
- <if test="processInstanceId != null" >
- process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
- </if>
- <if test="processDefinitionId != null" >
- process_definition_id = #{processDefinitionId,jdbcType=VARCHAR},
- </if>
- <if test="currentApprovePath != null" >
- current_approve_path = #{currentApprovePath,jdbcType=VARCHAR},
- </if>
- <if test="agreeTime != null" >
- agree_time = #{agreeTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createrId != null" >
- creater_id = #{createrId,jdbcType=INTEGER},
- </if>
- <if test="creater != null" >
- creater = #{creater,jdbcType=VARCHAR},
- </if>
- <if test="createTime != null" >
- create_time = #{createTime,jdbcType=TIMESTAMP},
- </if>
- <if test="createUnit != null" >
- create_unit = #{createUnit,jdbcType=VARCHAR},
- </if>
- <if test="orgId != null" >
- org_id = #{orgId,jdbcType=INTEGER},
- </if>
- <if test="inApplication != null" >
- in_application = #{inApplication,jdbcType=INTEGER},
- </if>
- <if test="totalQuantity != null" >
- total_quantity = #{totalQuantity,jdbcType=VARCHAR},
- </if>
- <if test="reportDate != null" >
- report_date = #{reportDate,jdbcType=TIMESTAMP},
- </if>
- <if test="sendDate != null" >
- send_date = #{sendDate,jdbcType=TIMESTAMP},
- </if>
- <if test="provinceRemark != null" >
- province_remark = #{provinceRemark,jdbcType=VARCHAR},
- </if>
- <if test="enterpriseRemark != null" >
- enterprise_remark = #{enterpriseRemark,jdbcType=VARCHAR},
- </if>
- <if test="attributeType != null" >
- attribute_type = #{attributeType,jdbcType=INTEGER},
- </if>
- <if test="refuseReason != null" >
- refuse_reason = #{refuseReason,jdbcType=VARCHAR},
- </if>
- <if test="updatetime != null" >
- updatetime = #{updatetime,jdbcType=TIMESTAMP},
- </if>
- <if test="kszxrq != null" >
- kszxrq = #{kszxrq,jdbcType=TIMESTAMP},
- </if>
- <if test="jzzxrq != null" >
- jzzxrq = #{jzzxrq,jdbcType=TIMESTAMP},
- </if>
- <if test="jhnd != null" >
- jhnd = #{jhnd,jdbcType=VARCHAR},
- </if>
-
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.chinaitop.depot.business.model.BusinessPlan" >
- <!--
- WARNING - @mbggenerated
- This element is automatically generated by MyBatis Generator, do not modify.
- This element was generated on Mon Jun 29 18:21:02 CST 2020.
- -->
- update business_plan
- set plan_number = #{planNumber,jdbcType=VARCHAR},
- plan_title = #{planTitle,jdbcType=VARCHAR},
- reference_number = #{referenceNumber,jdbcType=VARCHAR},
- plan_desc = #{planDesc,jdbcType=VARCHAR},
- execute_type = #{executeType,jdbcType=INTEGER},
- out_amount = #{outAmount,jdbcType=VARCHAR},
- in_amount = #{inAmount,jdbcType=VARCHAR},
- out_total_price = #{outTotalPrice,jdbcType=VARCHAR},
- in_total_price = #{inTotalPrice,jdbcType=VARCHAR},
- customer_plan_state = #{customerPlanState,jdbcType=VARCHAR},
- plan_customer = #{planCustomer,jdbcType=VARCHAR},
- audit_state = #{auditState,jdbcType=VARCHAR},
- process_instance_id = #{processInstanceId,jdbcType=VARCHAR},
- process_definition_id = #{processDefinitionId,jdbcType=VARCHAR},
- current_approve_path = #{currentApprovePath,jdbcType=VARCHAR},
- agree_time = #{agreeTime,jdbcType=TIMESTAMP},
- creater_id = #{createrId,jdbcType=INTEGER},
- creater = #{creater,jdbcType=VARCHAR},
- create_time = #{createTime,jdbcType=TIMESTAMP},
- create_unit = #{createUnit,jdbcType=VARCHAR},
- org_id = #{orgId,jdbcType=INTEGER},
- in_application = #{inApplication,jdbcType=INTEGER},
- total_quantity = #{totalQuantity,jdbcType=VARCHAR},
- report_date = #{reportDate,jdbcType=TIMESTAMP},
- send_date = #{sendDate,jdbcType=TIMESTAMP},
- province_remark = #{provinceRemark,jdbcType=VARCHAR},
- enterprise_remark = #{enterpriseRemark,jdbcType=VARCHAR},
- attribute_type = #{attributeType,jdbcType=INTEGER},
- refuse_reason = #{refuseReason,jdbcType=VARCHAR},
- updatetime = #{updatetime,jdbcType=TIMESTAMP},
- kszxrq = #{kszxrq,jdbcType=TIMESTAMP},
- jzzxrq = #{jzzxrq,jdbcType=TIMESTAMP},
- jhnd = #{jhnd,jdbcType=VARCHAR}
-
- where id = #{id,jdbcType=INTEGER}
- </update>
-
- <select id="getApprovalList" resultMap="approvalResultMap" parameterType="java.util.Map" >
- select
- a.id id, a.plan_number plan_number, a.reference_number reference_number, a.execute_type execute_type,
- a.in_amount in_amount,a.out_amount out_amount, a.create_time create_time,
- a.process_instance_id process_instance_id,
- a.process_definition_id process_definition_id,
- b.id auditId,
- b.result result, b.task_id task_id,b.task_name task_name
- from business_plan a, business_approval b
- <where>
- a.process_instance_id = b.process_instance_id
- and
- a.audit_state != 0
- <if test="operator != null">
- and b.operator = #{operator}
- </if>
- <if test="result != null">
- and b.result = #{result}
- </if>
- <if test="planNumber != null">
- and a.plan_number LIKE CONCAT(CONCAT('%', #{planNumber}), '%')
- </if>
- <if test="attributeType != null">
- and a.attribute_type = #{attributeType}
- </if>
- order by FIELD(b.result, '待审批', '同意', '驳回', '拒绝'), b.create_time desc
- </where>
- </select>
-
- <select id="selectByExampleToVO" resultMap="approvalResultMap" parameterType="com.chinaitop.depot.business.model.BusinessPlanExample" >select
- <if test="distinct" >
- distinct
- </if>
- <include refid="Base_Column_List" />
- from business_plan
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null" >
- order by ${orderByClause}
- </if>
- </select>
-
- <update id="updateByStatus" parameterType="java.lang.Integer">
- update business_plan set customer_plan_state=1 where id=#{id};
- </update>
-
- <!-- 审批结束的(audit_state = 2),终止(in_application = 3),已上报的(customer_plan_state=50)的轮换计划(execute_type=3156)-->
- <select id="getAcceptanceList" resultMap="approvalResultMap" parameterType="java.util.Map" >
- SELECT
- a.id id,a.plan_number plan_number,a.reference_number reference_number,
- a.execute_type execute_type,
- a.customer_plan_state customer_plan_state,
- a.in_application in_application,
- detail.grain_kind grain_kind,
- detail.grain_attribute grain_attribute,
- detail.grain_annual grain_annual,
- detail.house_id house_id,
- detail.warehouse_id warehouse_id,
- a.create_time create_time,
- a.process_instance_id process_instance_id,
- a.process_definition_id process_definition_id,
- a.plan_title plan_title,
- acceptance.application_date applicationDate,
- acceptance.acceptance_type acceptanceType
- FROM
- business_plan a
- LEFT JOIN business_plan_acceptance acceptance ON acceptance.plan_id = a.id
- LEFT JOIN business_store_ware_detail detail ON detail.zid = a.id
- <where>
- a.audit_state = 2 AND a.in_application = 3 AND a.execute_type=3156 AND customer_plan_state=50
- <if test="planTitle != null">
- and a.plan_title LIKE CONCAT(CONCAT('%', #{planTitle}), '%')
- </if>
- <if test="planNumber != null">
- and a.plan_number LIKE CONCAT(CONCAT('%', #{planNumber}), '%')
- </if>
- order by a.create_time desc
- </where>
- </select>
-
- <insert id="addAcceptance" useGeneratedKeys="true" keyProperty="id" parameterType="java.util.Map">
- INSERT INTO business_plan_acceptance (plan_id, application_date, acceptance_number,acceptance_type) VALUES
- ${sql}
- </insert>
-
- <insert id="addAcceptanceDetail" parameterType="java.util.Map">
- INSERT INTO business_plan_acceptance_detail (acceptance_id, qualitycheck_id) VALUES
- ${sqlDetail}
- </insert>
-
- <select id="getDataByZJId" resultMap="BaseResultMap" parameterType="java.util.Map" >
- SELECT
- quality.*,house.storehouse_name storehouseName,warehouse.warehouse_name wareHouseName, acceptance.id acceptanceId
- FROM
- business_plan_acceptance acceptance
- INNER JOIN business_plan_acceptance_detail detail ON detail.acceptance_id = acceptance.id
- INNER JOIN storage_qualitycheck quality ON quality.id = detail.qualitycheck_id
- INNER JOIN basic_storehouse house ON house.storehouse_id = quality.house_id
- INNER JOIN basic_warehouse warehouse ON warehouse.warehouse_id = quality.warehouse_id
- where acceptance.plan_id = #{id,jdbcType=VARCHAR}
- </select>
-
-
- <select id="queryAcceptanceList" parameterType="java.util.Map" resultType="java.util.HashMap" >
- select * from business_plan_acceptance a left join business_plan p on a.plan_id=p.id
- <!-- left join business_plan_acceptance_detail pa on pa.acceptance_id = a.id -->
- <where>
- p.creater_id = #{userId} and p.org_id = #{orgId}
- <if test="planTitle != null">
- and p.plan_title LIKE CONCAT('%',#{planTitle,jdbcType=VARCHAR},'%')
- </if>
- <if test="planNumber != null">
- and p.plan_number LIKE CONCAT('%',#{planNumber,jdbcType=VARCHAR},'%')
- </if>
- <if test="customerPlanState != null">
- and p.customer_plan_state = #{customerPlanState}
- </if>
- order by p.create_time desc
- </where>
- </select>
-
- <!-- 架空期查询 -->
- <select id="getjkqPlanList" parameterType="java.util.Map" resultType="java.util.HashMap" >
- SELECT
- a.ch,
- a.hwh,
- a.wjh
- FROM
- lsreport_ts.data_kcgl_fcbgz_default a
- LEFT JOIN lsreport_ts.data_kcgl_xckc_default b ON a.DataID = b.DataID
- LEFT JOIN depot.business_delivery_storage_notice c ON b.tzdh = c.bill_number
- LEFT JOIN depot.business_plan d ON c.plan_number = d.plan_number
- <where>
- <if test="orgId != null">
- AND d.org_id = #{orgId}
- </if>
- <if test="executeType != null">
- AND d.execute_type = #{executeType}
- </if>
- <if test="cjsjA != null and cjsjB != null and cjsjA != '' and cjsjB != ''" >
- AND a.cjsj between #{cjsjA} and #{cjsjB}
- </if>
- <if test="rqA != null and rqB != null and rqA != '' and rqB != ''" >
- AND a.rq between #{rqA} and #{rqB}
- </if>
- </where>
- </select>
- <!-- 查询轮换日期 -->
- <select id="getjkqDayList" parameterType="java.util.Map" resultType="java.util.HashMap" >
- SELECT
- distinct
- a.cjsj AS modifydate,
- a.ch,
- a.hwh,
- a.mxpz,
- a.hwxz,
- a.zcsl,
- SUM(a.srsl) AS srsl,
- c.bill_number,
- c.plan_number AS jhbh,
- (IFNULL(d.customer_plan_state,7)) AS planSp,
- DATE_FORMAT(DATE_ADD(a.cjsj,INTERVAL 1 DAY),'%Y-%m-%d') AS jkqStart,
- DATE_FORMAT(DATE_ADD(a.cjsj,INTERVAL 1 DAY),'%Y-%m-%d') AS jkqEnd,
- a.rq
- FROM
- lsreport_ts.data_kcgl_fcbgz_default a
- LEFT JOIN lsreport_ts.data_kcgl_xckc_default b ON a.DataID = b.DataID
- LEFT JOIN depot.business_delivery_storage_notice c ON b.tzdh = c.bill_number
- LEFT JOIN depot.business_plan d ON c.plan_number = d.plan_number
- <where>
- <if test="orgId != null">
- AND d.org_id = #{orgId}
- </if>
- <if test="ch != null">
- AND a.ch = #{ch}
- </if>
- <if test="hwh != null">
- AND a.hwh = #{hwh}
- </if>
- <if test="wjh != null">
- AND c.plan_number = #{wjh}
- </if>
- <if test="executeType != null">
- AND d.execute_type = #{executeType}
- </if>
- <if test="cjsjA != null and cjsjB != null and cjsjA != '' and cjsjB != ''" >
- AND a.cjsj between #{cjsjA} and #{cjsjB}
- </if>
- <if test="rqA != null and rqB != null and rqA != '' and rqB != ''" >
- AND a.rq between #{rqA} and #{rqB}
- </if>
- </where>
- ORDER BY
- a.rq DESC
- </select>
-
-
- <select id="getjybjl" parameterType="java.lang.Integer" resultType="java.lang.Integer">
- SELECT
- count(1)
- FROM
- user_role
- WHERE
- role_id = (
- SELECT
- role_id
- FROM
- role_info
- WHERE
- role_name = '经营部经理'
- AND org_id = #{orgId}
- )
- </select>
-
- <select id="getzzbjl" parameterType="java.lang.Integer" resultType="java.lang.Integer">
- SELECT
- count(1)
- FROM
- user_role
- WHERE
- role_id = (
- SELECT
- role_id
- FROM
- role_info
- WHERE
- role_name = '中转部经理'
- AND org_id = #{orgId}
- )
- </select>
- </mapper>
|