| | |
| | | <mapper namespace="com.ld.igds.inout.mapper.InoutRecordMapper"> |
| | | <!-- 基本返回信息 --> |
| | | <sql id="BASE_COLUMN"> |
| | | ID_ as id, |
| | | ID_ |
| | | as id, |
| | | COMPANY_ID_ as companyId, |
| | | DEPT_ID_ as deptId, |
| | | NOTICE_ID_ as noticeId, |
| | |
| | | TYPE_ as type, |
| | | PROGRESS_ as progress, |
| | | RECORD_STATUS_ as recordStatus, |
| | | CUSTOMER_NAME_ as customerName, |
| | | INTEL_CARD_ as intelCard, |
| | | REGISTER_TIME_ as registerTime, |
| | | REGISTER_USER_ as registerUser, |
| | | USER_NAME_ as userName, |
| | | USER_CONTACT_ as userContact, |
| | | USER_ID_ as userId, |
| | | USER_BIRTHDAY_ as userBirthday, |
| | | USER_SEX_ as userSex, |
| | | USER_NATION_ as userNation, |
| | | USER_ID_ as userId, |
| | | USER_CONTACT_ as userContact, |
| | | USER_ADDRESS_ as userAddress, |
| | | CUR_STORAGE_ as curStorage, |
| | | INTEL_CARD_ as intelCard, |
| | | PLATE_NUM_ as plateNum, |
| | | TRANS_TYPE_ as transType, |
| | | SPEC_TYPE_ as specType, |
| | | CUSTOMER_ID_ as customerId, |
| | | CUSTOMER_NAME_ as customerName, |
| | | FOOD_VARIETY_ as foodVariety, |
| | | FOOD_TYPE_ as foodType, |
| | | FOOD_LEVEL_ as foodLevel, |
| | | FOOD_LOCATION_ID_ as foodLocationId, |
| | | FOOD_LOCATION_ as foodLocation, |
| | | FOOD_YEAR_ as foodYear, |
| | | CHECK_STATUS_ as checkStatus, |
| | | CHECK_USER_ as checkUser, |
| | | CHECK_TIME_ as checkTime, |
| | | SAMPLE_USER_ as sampleUser, |
| | | SAMPLE_TIME_ as sampleTime, |
| | | SAMPLE_TYPE_ as sampleType, |
| | | CHECK_ID_ as checkId, |
| | | IMPURITY_ as impurity, |
| | | WET_ as wet, |
| | | DE_IMPURITY_ as deImpurity, |
| | | DE_WET_ as deWet, |
| | | DE_HANDLE_ as deHandle, |
| | | DE_OTHER_ as deOther, |
| | | DE_SUM_ as deSum, |
| | | DE_CHECK_ as deCheck, |
| | | ADD_CHECK_ as addCheck, |
| | | jjlx as jjlx, |
| | | FULL_WEIGHT_ as fullWeight, |
| | | FULL_WEIGHT_TIME_ as fullWeightTime, |
| | | FULL_WEIGHT_USER_ as fullWeightUser, |
| | |
| | | EMPTY_WEIGHT_TIME_ as emptyWeightTime, |
| | | EMPTY_WEIGHT_USER_ as emptyWeightUser, |
| | | NET_WEIGHT_ as netWeight, |
| | | DE_HANDLE_ as deHandle, |
| | | DE_PACKAGE_ as dePackage, |
| | | DE_OTHER_ as deOther, |
| | | DE_OTHER_INTO_ as deOtherInfo, |
| | | SETTLE_WEIGHT_ as settleWeight, |
| | | RECORD_WEIGHT_ as recordWeight, |
| | | PRICE_ as price, |
| | | SETTLE_MONEY_ as settleMoney, |
| | | HANDLE_START_ as handleStart, |
| | | HANDLE_END_ as handleEnd, |
| | | SETTLE_ID_ as settleId, |
| | | HANDLE_USER_ as handleUser, |
| | | COMPLETE_TIME_ as completeTime, |
| | | COMPLETE_USER_ as completeUser, |
| | | REMARKS_ as remarks |
| | | </sql> |
| | | REMARKS_ as remarks, |
| | | bzw as bzw, |
| | | dbz as dbz, |
| | | bzbjs as bzbjs |
| | | </sql> |
| | | |
| | | <!-- 根据条件查询,数据必须是流程中的数据 --> |
| | | <select id="inoutProgressQuery" resultType="com.ld.igds.inout.dto.InoutData" |
| | |
| | | <if test="param.intelCard != null and param.intelCard != '' ">AND INTEL_CARD_ = #{param.intelCard}</if> |
| | | <if test="param.id != null and param.id != '' ">AND ID_ = #{param.id}</if> |
| | | <if test="param.progress != null and param.progress != '' ">AND PROGRESS_ = #{param.progress}</if> |
| | | |
| | | AND PROGRESS_ != 'RECORD' |
| | | AND RECORD_STATUS_ != 'ERROR' |
| | | AND RECORD_STATUS_ != 'DEL' |
| | | </where> |
| | | </select> |
| | |
| | | <if test="param.id != null and param.id != '' ">AND ID_ = #{param.id}</if> |
| | | <if test="param.progress != null and param.progress != '' ">AND PROGRESS_ = #{param.progress}</if> |
| | | <if test="param.end != null">AND |
| | | COMPLETE_TIME_ <![CDATA[ < ]]>#{param.end,jdbcType=TIMESTAMP} |
| | | UPDATE_TIME_ <![CDATA[ < ]]>#{param.end,jdbcType=TIMESTAMP} |
| | | </if> |
| | | <if test="param.start != null">AND |
| | | COMPLETE_TIME_ <![CDATA[ > ]]>#{param.start,jdbcType=TIMESTAMP} |
| | | UPDATE_TIME_ <![CDATA[ > ]]>#{param.start,jdbcType=TIMESTAMP} |
| | | </if> |
| | | AND PROGRESS_ = 'RECORD' |
| | | AND RECORD_STATUS_ != 'ERROR' |
| | | AND RECORD_STATUS_ != 'DEL' |
| | | ORDER BY COMPLETE_TIME_ |
| | | ORDER BY UPDATE_TIME_ |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | from |
| | | D_INOUT_RECORD |
| | | <where> |
| | | <if test="param.id != null and param.id != '' ">AND ID_ = #{param.id}</if> |
| | | <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if> |
| | | <if test="param.type != null and param.type != '' ">AND TYPE_ = #{param.type}</if> |
| | | <if test="param.plateNum != null and param.plateNum != '' ">AND PLATE_NUM_ = #{param.plateNum}</if> |
| | |
| | | <where> |
| | | <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if> |
| | | <if test="param.depotId != null and param.depotId != '' ">AND DEPOT_ID_ = #{param.depotId}</if> |
| | | <if test="param.type != null and param.type != '' ">AND TYPE_ = #{param.type}</if> |
| | | <if test="param.plateNum != null and param.plateNum != '' ">AND PLATE_NUM_ = #{param.plateNum}</if> |
| | | <if test="param.intelCard != null and param.intelCard != '' ">AND INTEL_CARD_ = #{param.intelCard}</if> |
| | | <if test="param.id != null and param.id != '' ">AND ID_ = #{param.id}</if> |
| | | <if test="param.userId != null and param.userId != '' ">AND USER_ID_ = #{param.userId}</if> |
| | | <if test="param.progress != null and param.progress != '' ">AND PROGRESS_ = #{param.progress}</if> |
| | | <if test="param.start != null">AND |
| | | REGISTER_TIME_ <![CDATA[ > ]]>#{param.start,jdbcType=TIMESTAMP} |
| | | </if> |
| | | <if test="param.end != null">AND |
| | | COMPLETE_TIME_ <![CDATA[ < ]]>#{param.end,jdbcType=TIMESTAMP} |
| | | </if> |
| | | <if test="param.curStorage > 0">AND CUR_STORAGE_ > 0</if> |
| | | </where> |
| | | AND PROGRESS_ = 'RECORD' |
| | | AND RECORD_STATUS_ != 'ERROR' |
| | | AND RECORD_STATUS_ != 'DEL' |
| | | ORDER BY COMPLETE_TIME_ DESC |
| | | ORDER BY UPDATE_TIME_ DESC |
| | | LIMIT 1 |
| | | </select> |
| | | |
| | |
| | | <if test="param.intelCard != null and param.plateNum != null"> |
| | | AND ( INTEL_CARD_ = #{param.intelCard} OR PLATE_NUM_ = #{param.plateNum} ) |
| | | </if> |
| | | and PROGRESS_ <> 'RECORD' and RECORD_STATUS_ != 'DEL' and RECORD_STATUS_ != 'ERROR' |
| | | and PROGRESS_ <> 'RECORD' and RECORD_STATUS_ != 'DEL' |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | <update id="inoutStop" parameterType="com.ld.igds.inout.dto.InoutParam"> |
| | | update D_INOUT_RECORD |
| | | <set> |
| | | RECORD_STATUS_ ='ERROR', |
| | | PROGRESS_ = 'RECORD', |
| | | <if test="param.recordStatus != null and param.recordStatus != '' ">RECORD_STATUS_ = |
| | | #{param.recordStatus}, |
| | | </if> |
| | | <if test="param.checkStatus != null and param.checkStatus != '' ">CHECK_STATUS_ = #{param.checkStatus},</if> |
| | | <if test="param.msg != null and param.msg != '' ">REMARKS_ = concat(REMARKS_,#{param.msg})</if> |
| | | </set> |
| | | <where> |
| | | <if test="param.companyId != null and param.companyId != '' ">COMPANY_ID_ = #{param.companyId}</if> |
| | | <if test="param.id != null and param.id != '' ">AND ID_ = #{param.id}</if> |
| | | </where> |
| | | |
| | | <where> |
| | | COMPANY_ID_ = #{param.companyId} |
| | | AND ID_ = #{param.id} |
| | | </where> |
| | | </update> |
| | | |
| | | |
| | | <select id="getMaxId" parameterType="java.lang.String" |
| | | resultType="java.util.Map"> |
| | | select MAX(ID_) AS maxId |
| | | from |
| | | D_INOUT_RECORD |
| | | where company_Id_ |
| | | =#{companyId} and id_ like #{likeKey} |
| | | </select> |
| | | select MAX(ID_) AS maxId |
| | | from D_INOUT_RECORD |
| | | where company_Id_ |
| | | = #{companyId} |
| | | and id_ like #{likeKey} |
| | | </select> |
| | | |
| | | <update id="updateData" parameterType="com.ld.igds.inout.dto.InoutData"> |
| | | update D_INOUT_RECORD set |
| | |
| | | <if test="data.checkStatus != null">CHECK_STATUS_ = #{data.checkStatus},</if> |
| | | <if test="data.checkId != null">CHECK_ID_ = #{data.checkId},</if> |
| | | <if test="data.checkUser != null">CHECK_USER_ = #{data.checkUser},</if> |
| | | <if test="data.checkTime != null">CHECK_TIME_ = #{data.checkTime},</if> |
| | | <if test="data.registerTime != null">REGISTER_TIME_ = #{data.registerTime},</if> |
| | | <if test="data.registerUser != null">REGISTER_USER_ = #{data.registerUser},</if> |
| | | <if test="data.userName != null">USER_NAME_ = #{data.userName},</if> |
| | |
| | | <if test="data.intelCard != null">INTEL_CARD_ = #{data.intelCard},</if> |
| | | <if test="data.plateNum != null">PLATE_NUM_ = #{data.plateNum},</if> |
| | | <if test="data.transType != null">TRANS_TYPE_ = #{data.transType},</if> |
| | | <if test="data.specType != null">SPEC_TYPE_ = #{data.specType},</if> |
| | | <if test="data.customerId != null">CUSTOMER_ID_ = #{data.customerId},</if> |
| | | <if test="data.customerName != null">CUSTOMER_NAME_ = #{data.customerName},</if> |
| | | <if test="data.foodVariety != null">FOOD_VARIETY_ = #{data.foodVariety},</if> |
| | | <if test="data.foodLevel != null">FOOD_LEVEL_ = #{data.foodLevel},</if> |
| | | <if test="data.foodLocationId != null">FOOD_LOCATION_ID_ = #{data.foodLocationId},</if> |
| | | <if test="data.foodLocation != null">FOOD_LOCATION_ = #{data.foodLocation},</if> |
| | | <if test="data.foodYear != null">FOOD_YEAR_ = #{data.foodYear},</if> |
| | | <if test="data.impurity != null">IMPURITY_ = #{data.impurity},</if> |
| | | <if test="data.deImpurity != null">DE_IMPURITY_ = #{data.deImpurity},</if> |
| | | <if test="data.wet != null">WET_ = #{data.wet},</if> |
| | | <if test="data.deWet != null">DE_WET_ = #{data.deWet},</if> |
| | | <if test="data.deHandle != null">DE_HANDLE_ = #{data.deHandle},</if> |
| | | <if test="data.deOther != null">DE_OTHER_ = #{data.deOther},</if> |
| | | <if test="data.deSum != null">DE_SUM_ = #{data.deSum},</if> |
| | | <if test="data.deOtherInfo != null">DE_OTHER_INTO_ = #{data.deOtherInfo},</if> |
| | | <if test="data.fullWeight != null">FULL_WEIGHT_ = #{data.fullWeight},</if> |
| | | <if test="data.fullWeightTime != null">FULL_WEIGHT_TIME_ = #{data.fullWeightTime},</if> |
| | | <if test="data.fullWeightUser != null">FULL_WEIGHT_USER_ = #{data.fullWeightUser},</if> |
| | |
| | | <if test="data.emptyWeightTime != null">EMPTY_WEIGHT_TIME_ = #{data.emptyWeightTime},</if> |
| | | <if test="data.emptyWeightUser != null">EMPTY_WEIGHT_USER_ = #{data.emptyWeightUser},</if> |
| | | <if test="data.netWeight != null">NET_WEIGHT_ = #{data.netWeight},</if> |
| | | <if test="data.settleId != null">SETTLE_ID_ = #{data.settleId},</if> |
| | | <if test="data.settleWeight != null">SETTLE_WEIGHT_ = #{data.settleWeight},</if> |
| | | <if test="data.recordWeight != null">RECORD_WEIGHT_ = #{data.recordWeight},</if> |
| | | <if test="data.handleStart != null">HANDLE_START_ = #{data.handleStart},</if> |
| | | <if test="data.handleEnd != null">HANDLE_END_ = #{data.handleEnd},</if> |
| | | <if test="data.handleUser != null">HANDLE_USER_ = #{data.handleUser},</if> |
| | | <if test="data.completeTime != null">COMPLETE_TIME_ = #{data.completeTime},</if> |
| | | <if test="data.completeUser != null">COMPLETE_USER_ = #{data.completeUser},</if> |
| | | <if test="data.remarks != null">REMARKS_ = #{data.remarks},</if> |
| | | <if test="data.curStorage != null">CUR_STORAGE_ = #{data.curStorage},</if> |
| | | <if test="data.foodType != null">FOOD_TYPE_ = #{data.foodType},</if> |
| | | <if test="data.price != null">PRICE_ = #{data.price},</if> |
| | | <if test="data.bzw != null">bzw = #{data.bzw},</if> |
| | | <if test="data.dbz != null">dbz = #{data.dbz},</if> |
| | | <if test="data.settleMoney != null">SETTLE_MONEY_ = #{data.settleMoney},</if> |
| | | PROGRESS_ = #{data.progress} |
| | | where |
| | |
| | | and id_=#{data.id} |
| | | </update> |
| | | |
| | | <update id="updateDataByHandle" parameterType="com.ld.igds.inout.dto.InoutData"> |
| | | update D_INOUT_RECORD |
| | | <trim prefix="SET" suffixOverrides=","> |
| | | <if test="data.deHandle != null">DE_HANDLE_ = #{data.deHandle},</if> |
| | | <if test="data.handleUser != null">HANDLE_USER_ = #{data.handleUser},</if> |
| | | <if test="data.deOther != null">DE_OTHER_ = #{data.deOther},</if> |
| | | <if test="data.deOtherInfo != null">DE_OTHER_INTO_ = #{data.deOtherInfo},</if> |
| | | <if test="data.dePackage != null">DE_PACKAGE_ = #{data.dePackage},</if> |
| | | <if test="data.bzw != null">bzw = #{data.bzw},</if> |
| | | <if test="data.dbz != null">dbz = #{data.dbz},</if> |
| | | <if test="data.bzbjs != null">bzbjs = #{data.bzbjs},</if> |
| | | <if test="data.progress != null">PROGRESS_ = #{data.progress},</if> |
| | | <if test="data.remarks != null">REMARKS_ = #{data.remarks},</if> |
| | | <if test="data.updateTime != null">UPDATE_TIME_ = #{data.updateTime},</if> |
| | | </trim> |
| | | where |
| | | company_id_ =#{data.companyId} |
| | | and id_=#{data.id} |
| | | </update> |
| | | |
| | | <!-- 登记时候插入当前库存的值curStorage 之后不做更改 --> |
| | | |
| | | <!-- 新增数据 --> |
| | | <insert id="insertData" parameterType="com.ld.igds.inout.dto.InoutData"> |
| | | insert into |
| | | D_INOUT_RECORD( |
| | | ID_, |
| | | COMPANY_ID_, |
| | | DEPT_ID_, |
| | | NOTICE_ID_, |
| | | DEPOT_ID_, |
| | | TYPE_, |
| | | PROGRESS_, |
| | | RECORD_STATUS_, |
| | | REGISTER_TIME_, |
| | | REGISTER_USER_, |
| | | USER_NAME_, |
| | | USER_BIRTHDAY_, |
| | | USER_SEX_, |
| | | USER_NATION_, |
| | | USER_ID_, |
| | | USER_CONTACT_, |
| | | USER_ADDRESS_, |
| | | CUR_STORAGE_, |
| | | INTEL_CARD_, |
| | | PLATE_NUM_, |
| | | TRANS_TYPE_, |
| | | SPEC_TYPE_, |
| | | CUSTOMER_ID_, |
| | | CUSTOMER_NAME_, |
| | | FOOD_VARIETY_, |
| | | FOOD_TYPE_, |
| | | FOOD_LEVEL_, |
| | | FOOD_LOCATION_, |
| | | FOOD_YEAR_, |
| | | CHECK_STATUS_, |
| | | CHECK_USER_, |
| | | CHECK_ID_, |
| | | IMPURITY_, |
| | | WET_, |
| | | DE_IMPURITY_, |
| | | DE_WET_, |
| | | DE_HANDLE_, |
| | | DE_OTHER_, |
| | | DE_SUM_, |
| | | FULL_WEIGHT_, |
| | | FULL_WEIGHT_TIME_, |
| | | FULL_WEIGHT_USER_, |
| | | EMPTY_WEIGHT_, |
| | | EMPTY_WEIGHT_TIME_, |
| | | EMPTY_WEIGHT_USER_, |
| | | NET_WEIGHT_, |
| | | SETTLE_WEIGHT_, |
| | | RECORD_WEIGHT_, |
| | | PRICE_, |
| | | SETTLE_MONEY_, |
| | | HANDLE_START_, |
| | | HANDLE_END_, |
| | | HANDLE_USER_, |
| | | COMPLETE_TIME_, |
| | | COMPLETE_USER_, |
| | | REMARKS_, |
| | | SETTLE_TAG_ |
| | | ) |
| | | values |
| | | ( |
| | | #{data.id}, |
| | | #{data.companyId}, |
| | | #{data.deptId}, |
| | | #{data.noticeId}, |
| | | #{data.depotId}, |
| | | #{data.type}, |
| | | #{data.progress}, |
| | | #{data.recordStatus}, |
| | | #{data.registerTime}, |
| | | #{data.registerUser}, |
| | | #{data.userName}, |
| | | #{data.userBirthday}, |
| | | #{data.userSex}, |
| | | #{data.userNation}, |
| | | #{data.userId}, |
| | | #{data.userContact}, |
| | | #{data.userAddress}, |
| | | #{data.curStorage}, |
| | | #{data.intelCard}, |
| | | #{data.plateNum}, |
| | | #{data.transType}, |
| | | #{data.specType}, |
| | | #{data.customerId}, |
| | | #{data.customerName}, |
| | | #{data.foodVariety}, |
| | | #{data.foodType}, |
| | | #{data.foodLevel}, |
| | | #{data.foodLocation}, |
| | | #{data.foodYear}, |
| | | #{data.checkStatus}, |
| | | #{data.checkUser}, |
| | | #{data.checkId}, |
| | | #{data.impurity}, |
| | | #{data.wet}, |
| | | #{data.deImpurity}, |
| | | #{data.deWet}, |
| | | #{data.deHandle}, |
| | | #{data.deOther}, |
| | | #{data.deSum}, |
| | | #{data.fullWeight}, |
| | | #{data.fullWeightTime}, |
| | | #{data.fullWeightUser}, |
| | | #{data.emptyWeight}, |
| | | #{data.emptyWeightTime}, |
| | | #{data.emptyWeightUser}, |
| | | #{data.netWeight}, |
| | | #{data.settleWeight}, |
| | | #{data.recordWeight}, |
| | | #{data.price}, |
| | | #{data.settleMoney}, |
| | | #{data.handleStart}, |
| | | #{data.handleEnd}, |
| | | #{data.handleUser}, |
| | | #{data.completeTime}, |
| | | #{data.completeUser}, |
| | | #{data.remarks}, |
| | | #{data.settleTag} |
| | | ) |
| | | </insert> |
| | | insert into D_INOUT_RECORD(ID_, |
| | | COMPANY_ID_, |
| | | DEPT_ID_, |
| | | NOTICE_ID_, |
| | | DEPOT_ID_, |
| | | TYPE_, |
| | | PROGRESS_, |
| | | RECORD_STATUS_, |
| | | CUSTOMER_NAME_, |
| | | INTEL_CARD_, |
| | | REGISTER_TIME_, |
| | | REGISTER_USER_, |
| | | USER_NAME_, |
| | | USER_CONTACT_, |
| | | USER_ID_, |
| | | USER_BIRTHDAY_, |
| | | USER_SEX_, |
| | | USER_NATION_, |
| | | USER_ADDRESS_, |
| | | PLATE_NUM_, |
| | | TRANS_TYPE_, |
| | | FOOD_VARIETY_, |
| | | FOOD_TYPE_, |
| | | FOOD_LEVEL_, |
| | | FOOD_LOCATION_ID_, |
| | | FOOD_LOCATION_, |
| | | FOOD_YEAR_, |
| | | CHECK_STATUS_, |
| | | CHECK_USER_, |
| | | CHECK_TIME_, |
| | | SAMPLE_USER_, |
| | | SAMPLE_TIME_, |
| | | SAMPLE_TYPE_, |
| | | CHECK_ID_, |
| | | DE_CHECK_, |
| | | ADD_CHECK_, |
| | | jjlx, |
| | | FULL_WEIGHT_, |
| | | FULL_WEIGHT_TIME_, |
| | | FULL_WEIGHT_USER_, |
| | | EMPTY_WEIGHT_, |
| | | EMPTY_WEIGHT_TIME_, |
| | | EMPTY_WEIGHT_USER_, |
| | | NET_WEIGHT_, |
| | | DE_HANDLE_, |
| | | DE_PACKAGE_, |
| | | DE_OTHER_, |
| | | DE_OTHER_INTO_, |
| | | SETTLE_WEIGHT_, |
| | | RECORD_WEIGHT_, |
| | | PRICE_, |
| | | SETTLE_MONEY_, |
| | | SETTLE_ID_, |
| | | HANDLE_USER_, |
| | | COMPLETE_TIME_, |
| | | COMPLETE_USER_, |
| | | REMARKS_, |
| | | bzw, |
| | | dbz, |
| | | bzbjs, |
| | | UPDATE_TIME_) |
| | | values (#{data.id}, |
| | | #{data.companyId}, |
| | | #{data.deptId}, |
| | | #{data.noticeId}, |
| | | #{data.depotId}, |
| | | #{data.type}, |
| | | #{data.progress}, |
| | | #{data.recordStatus}, |
| | | #{data.customerName}, |
| | | #{data.intelCard}, |
| | | #{data.registerTime}, |
| | | #{data.registerUser}, |
| | | #{data.userName}, |
| | | #{data.userContact}, |
| | | #{data.userId}, |
| | | #{data.userBirthday}, |
| | | #{data.userSex}, |
| | | #{data.userNation}, |
| | | #{data.userAddress}, |
| | | #{data.plateNum}, |
| | | #{data.transType}, |
| | | #{data.foodVariety}, |
| | | #{data.foodType}, |
| | | #{data.foodLevel}, |
| | | #{data.foodLocationId}, |
| | | #{data.foodLocation}, |
| | | #{data.foodYear}, |
| | | #{data.checkStatus}, |
| | | #{data.checkUser}, |
| | | #{data.checkTime}, |
| | | #{data.sampleUser}, |
| | | #{data.sampleTime}, |
| | | #{data.sampleType}, |
| | | #{data.checkId}, |
| | | #{data.deCheck}, |
| | | #{data.addCheck}, |
| | | #{data.jjlx}, |
| | | #{data.fullWeight}, |
| | | #{data.fullWeightTime}, |
| | | #{data.fullWeightUser}, |
| | | #{data.emptyWeight}, |
| | | #{data.emptyWeightTime}, |
| | | #{data.emptyWeightUser}, |
| | | #{data.netWeight}, |
| | | #{data.deHandle}, |
| | | #{data.dePackage}, |
| | | #{data.deOther}, |
| | | #{data.deOtherInfo}, |
| | | #{data.settleWeight}, |
| | | #{data.recordWeight}, |
| | | #{data.price}, |
| | | #{data.settleMoney}, |
| | | #{data.settleId}, |
| | | #{data.handleUser}, |
| | | #{data.completeTime}, |
| | | #{data.completeUser}, |
| | | #{data.remarks}, |
| | | #{data.bzw}, |
| | | #{data.dbz}, |
| | | #{data.bzbjs}, |
| | | #{data.updateTime}) |
| | | </insert> |
| | | |
| | | <select id="pageRecordData" resultType="com.ld.igds.inout.dto.InoutData" |
| | | parameterType="com.ld.igds.inout.dto.InoutParam"> |
| | |
| | | <if test="param.checkStatus != null and param.checkStatus == 'NONE' ">AND CHECK_STATUS_ = 'NONE'</if> |
| | | |
| | | </where> |
| | | AND RECORD_STATUS_ != 'DEL' |
| | | |
| | | <choose> |
| | | <when test="param.recordStatus != null and param.recordStatus == 'DEL' "> |
| | | AND RECORD_STATUS_ = 'DEL' |
| | | </when> |
| | | <otherwise> |
| | | AND RECORD_STATUS_ != 'DEL' |
| | | </otherwise> |
| | | </choose> |
| | | |
| | | |
| | | <choose> |
| | | <when test="param.orderTag != null and param.orderTag == 'ASC' "> |
| | |
| | | <!-- 完成出入库--> |
| | | <update id="toComplete" parameterType="com.ld.igds.inout.dto.InoutParam"> |
| | | update D_INOUT_RECORD |
| | | set PROGRESS_ = #{param.progress}, |
| | | COMPLETE_TIME_ =#{param.completeTime}, |
| | | <if test="param.fullWeight != null and param.fullWeight > 0">FULL_WEIGHT_ = #{param.fullWeight},</if> |
| | | <if test="param.fullWeightUser != null">FULL_WEIGHT_USER_ = #{param.fullWeightUser},</if> |
| | | <if test="param.fullWeightTime != null">FULL_WEIGHT_TIME_ = #{param.fullWeightTime},</if> |
| | | <if test="param.emptyWeight != null and param.fullWeight > 0">EMPTY_WEIGHT_ = #{param.emptyWeight},</if> |
| | | <if test="param.emptyWeightTime != null">EMPTY_WEIGHT_TIME_ = #{param.emptyWeightTime},</if> |
| | | <if test="param.emptyWeightUser != null">EMPTY_WEIGHT_USER_ = #{param.emptyWeightUser},</if> |
| | | <if test="param.netWeight != null and param.fullWeight > 0">NET_WEIGHT_ = #{param.netWeight},</if> |
| | | <if test="param.settleWeight != null and param.settleWeight > 0">SETTLE_WEIGHT_ = #{param.settleWeight},</if> |
| | | <if test="param.recordWeight != null and param.recordWeight > 0">RECORD_WEIGHT_ = #{param.recordWeight},</if> |
| | | <if test="param.de != null and param.de > 0">DE_SUM_ = #{param.de},</if> |
| | | <if test="param.depotId != null and param.depotId != ''">DEPOT_ID_ = #{param.depotId},</if> |
| | | <if test="param.price != null and param.price > 0">PRICE_ = #{param.price},</if> |
| | | <if test="param.settleMoney != null and param.settleMoney > 0">SETTLE_MONEY_ = #{param.settleMoney},</if> |
| | | COMPLETE_USER_ = #{param.userId} |
| | | set PROGRESS_ = #{param.progress}, |
| | | COMPLETE_TIME_ =#{param.completeTime}, |
| | | COMPLETE_USER_ = #{param.userId}, |
| | | UPDATE_TIME_ = #{param.updateTime} |
| | | where ID_ = #{param.id} |
| | | and TYPE_ = #{param.type} |
| | | and COMPANY_ID_ = #{param.companyId} |
| | | and RECORD_STATUS_ != 'DEL' |
| | | and RECORD_STATUS_ != 'ERROR' |
| | | and TYPE_ = #{param.type} |
| | | and COMPANY_ID_ = #{param.companyId} |
| | | and RECORD_STATUS_ != 'DEL' |
| | | </update> |
| | | |
| | | <!-- 查询流程未完成的流水信息 --> |
| | |
| | | AND RECORD_STATUS_ != 'DEL' |
| | | AND PROGRESS_ != 'RECORD' |
| | | AND PROGRESS_ != 'PAY' |
| | | AND RECORD_STATUS_ != 'ERROR' |
| | | </select> |
| | | |
| | | |
| | |
| | | where |
| | | PROGRESS_ = 'RECORD' |
| | | AND RECORD_STATUS_ != 'DEL' |
| | | AND RECORD_STATUS_ != 'ERROR' |
| | | <if test="param.type != null and param.type != ''">AND TYPE_ = #{param.type}</if> |
| | | <if test="param.companyId != null and param.companyId != ''">AND COMPANY_ID_ = #{param.companyId}</if> |
| | | <if test="param.deptId != null and param.deptId != ''">AND DEPT_ID_ = #{param.deptId}</if> |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <!--根据车牌和卡号验证是否有重复信息--> |
| | | <select id="checkExist" parameterType="com.ld.igds.inout.dto.InoutParam" resultType="int"> |
| | | select count(1) |
| | | from |
| | | D_INOUT_RECORD |
| | | WHERE COMPANY_ID_ = #{param.companyId} |
| | | AND TYPE_ = #{param.type} |
| | | AND (PLATE_NUM_ = #{param.plateNum} or INTEL_CARD_ = #{param.intelCard}) |
| | | AND PROGRESS_ != 'RECORD' |
| | | AND RECORD_STATUS_ != 'DEL' |
| | | <if test="param.start != null"> |
| | | AND REGISTER_TIME_ <![CDATA[ > ]]> #{param.start,jdbcType=TIMESTAMP} |
| | | </if> |
| | | </select> |
| | | |
| | | <!-- 根据条件查询,要求时间条件必须,必须是正常数据 --> |
| | | <select id="listLossOver" resultType="com.ld.igds.models.InoutLossOver" |
| | | parameterType="com.ld.igds.inout.dto.InoutParam"> |
| | | select |
| | | ID_ as id, |
| | | COMPANY_ID_ as companyId, |
| | | DEPT_ID_ as deptId, |
| | | DEPOT_ID_ as depotId, |
| | | TYPE_ as type, |
| | | SUBMIT_TIME_ as submitTime, |
| | | rkjz as rkjz, |
| | | rksj as rksj, |
| | | rksf as rksf, |
| | | rkzz as rkzz, |
| | | cksj as cksj, |
| | | ckjz as ckjz, |
| | | cksf as cksf, |
| | | ckzz as ckzz, |
| | | AMOUNT_ as amount, |
| | | sysfzc as sysfzc, |
| | | syyy as syyy, |
| | | ccshr as ccshr, |
| | | AUDIT_CCSH_ as auditCcsh, |
| | | INFO_CCSH_ as InfoCcsh, |
| | | zjshr as zjshr, |
| | | AUDIT_ZJSH_ as auditZjsh, |
| | | INFO_ZJSH_ as infoZjsh, |
| | | AUDIT_TJSH_ as auditTjsh, |
| | | INFO_TJSH_ as infoTjsh, |
| | | kjshr as kjshr, |
| | | AUDIT_KJSH_ as auditKjsh, |
| | | INFO_KJSH_ as infoKjsh, |
| | | ldshr as ldshr, |
| | | AUDIT_LDSH_ as auditLdsh, |
| | | INFO_LDSH_ as infoLdsh, |
| | | REMARK_ as remark, |
| | | UPDATE_TIME_ as updateTime, |
| | | UPDATE_USER_ as updateUser |
| | | from |
| | | D_INOUT_LOSS_OVER |
| | | <where> |
| | | <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if> |
| | | <if test="param.deptId != null and param.deptId != ''">AND DEPT_ID_ = #{param.deptId}</if> |
| | | <if test="param.depotId != null and param.depotId != '' ">AND DEPOT_ID_ = #{param.depotId}</if> |
| | | <if test="param.type != null and param.type != '' ">AND TYPE_ = #{param.type}</if> |
| | | <if test="param.end != null">AND |
| | | UPDATE_TIME_ <![CDATA[ < ]]>#{param.end,jdbcType=TIMESTAMP} |
| | | </if> |
| | | <if test="param.start != null">AND |
| | | UPDATE_TIME_ <![CDATA[ > ]]>#{param.start,jdbcType=TIMESTAMP} |
| | | </if> |
| | | ORDER BY UPDATE_TIME_ |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- 获取开始周期-截至周期内,出入库入库重量汇总合计 --> |
| | | <select id="sumLossOverWeight" resultType="com.ld.igds.data.CommonData" |
| | | parameterType="com.ld.igds.inout.dto.InoutParam"> |
| | | select SUM(AMOUNT_) as numValue1 |
| | | from D_INOUT_LOSS_OVER |
| | | <where> |
| | | <if test="param.companyId != null and param.companyId != '' ">AND COMPANY_ID_ = #{param.companyId}</if> |
| | | <if test="param.deptId != null and param.deptId != ''">AND DEPT_ID_ = #{param.deptId}</if> |
| | | <if test="param.depotId != null and param.depotId != '' ">AND DEPOT_ID_ = #{param.depotId}</if> |
| | | <if test="param.type != null and param.type != '' ">AND TYPE_ = #{param.type}</if> |
| | | <if test="param.end != null">AND |
| | | UPDATE_TIME_ <![CDATA[ < ]]>#{param.end,jdbcType=TIMESTAMP} |
| | | </if> |
| | | <if test="param.start != null">AND |
| | | UPDATE_TIME_ <![CDATA[ > ]]>#{param.start,jdbcType=TIMESTAMP} |
| | | </if> |
| | | ORDER BY UPDATE_TIME_ |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |