|
|
|
@ -45,6 +45,9 @@
|
|
|
|
|
SET lddl.loading_time = now() |
|
|
|
|
WHERE ldl.package_id = #{id} and lddl.loading_time is null |
|
|
|
|
</update> |
|
|
|
|
<update id="updateloadingTimeById"> |
|
|
|
|
UPDATE logpm_distribution_delivery_list lddl SET lddl.loading_time = now() WHERE lddl.id = #{id} and lddl.loading_time is null |
|
|
|
|
</update> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectDistributionDeliveryListPage" resultType="com.logpm.distribution.vo.DistributionDeliveryListVO"> |
|
|
|
@ -79,9 +82,18 @@
|
|
|
|
|
logpm_distribution_delivery_list lddl |
|
|
|
|
<where> |
|
|
|
|
|
|
|
|
|
<if test="param.trainNumber != null and param.trainNumber!=''"> |
|
|
|
|
and lddl.train_number like concat('%',#{param.trainNumber},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.warehouseName != null and param.warehouseName!=''"> |
|
|
|
|
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.vehicleName != null and param.vehicleName!=''"> |
|
|
|
|
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.driverName != null and param.driverName!=''"> |
|
|
|
|
and lddl.driver_name like concat('%',#{param.driverName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.kind != null and param.kind!=''"> |
|
|
|
|
and lddl.kind = #{param.kind} |
|
|
|
|
</if> |
|
|
|
@ -111,29 +123,41 @@
|
|
|
|
|
SELECT * FROM logpm_distribution_delivery_list ${ew.customSqlSegment} |
|
|
|
|
</select> |
|
|
|
|
<select id="selectBycommercialNub" resultType="java.lang.Integer"> |
|
|
|
|
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list |
|
|
|
|
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list lddl |
|
|
|
|
<where> |
|
|
|
|
type = '2' |
|
|
|
|
lddl.type = '2' |
|
|
|
|
<if test="param.trainNumber != null and param.trainNumber!=''"> |
|
|
|
|
and lddl.train_number like concat('%',#{param.trainNumber},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.warehouseName != null and param.warehouseName!=''"> |
|
|
|
|
and warehouse_name like concat('%',#{param.warehouseName},'%') |
|
|
|
|
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.vehicleName != null and param.vehicleName!=''"> |
|
|
|
|
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.driverName != null and param.driverName!=''"> |
|
|
|
|
and lddl.driver_name like concat('%',#{param.driverName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.kind != null and param.kind!=''"> |
|
|
|
|
and kind = #{param.kind} |
|
|
|
|
and lddl.kind = #{param.kind} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.distributionCompany != null and param.distributionCompany!=''"> |
|
|
|
|
and distribution_company = #{param.distributionCompany} |
|
|
|
|
and lddl.distribution_company = #{param.distributionCompany} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.type != null and param.type!=''"> |
|
|
|
|
and lddl.type = #{param.type} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.state != null and param.state!=''"> |
|
|
|
|
and state = #{param.state} |
|
|
|
|
and lddl.state = #{param.state} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.createTime_query!=null and param.createTime_query!=''"> |
|
|
|
|
and date_format(create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%') |
|
|
|
|
and lddl.date_format(create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.leadTime!=null and param.leadTime!=''"> |
|
|
|
|
and date_format(lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%') |
|
|
|
|
<if test="param.leadTime!=null and param.leadTime!=''"> |
|
|
|
|
and lddl.date_format(lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.loadingTime!=null and param.loadingTime!=''"> |
|
|
|
|
and date_format(loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%') |
|
|
|
|
<if test="param.loadingTime!=null and param.loadingTime!=''"> |
|
|
|
|
and lddl.date_format(loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
@ -145,53 +169,77 @@
|
|
|
|
|
JOIN logpm_distribution_loadscan ldl ON lddl.id = ldl.delivery_id |
|
|
|
|
<where> |
|
|
|
|
lddl.type = '2' |
|
|
|
|
<if test="param.trainNumber != null and param.trainNumber!=''"> |
|
|
|
|
and lddl.train_number like concat('%',#{param.trainNumber},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.warehouseName != null and param.warehouseName!=''"> |
|
|
|
|
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.vehicleName != null and param.vehicleName!=''"> |
|
|
|
|
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.driverName != null and param.driverName!=''"> |
|
|
|
|
and lddl.driver_name like concat('%',#{param.driverName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.kind != null and param.kind!=''"> |
|
|
|
|
and lddl.kind = #{param.kind} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.distributionCompany != null and param.distributionCompany!=''"> |
|
|
|
|
and lddl.distribution_company = #{param.distributionCompany} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.type != null and param.type!=''"> |
|
|
|
|
and lddl.type = #{param.type} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.state != null and param.state!=''"> |
|
|
|
|
and lddl.state = #{param.state} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.createTime_query!=null and param.createTime_query!=''"> |
|
|
|
|
and date_format(lddl.create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%') |
|
|
|
|
and lddl.date_format(create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.leadTime!=null and param.leadTime!=''"> |
|
|
|
|
and date_format(lddl.lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%') |
|
|
|
|
and lddl.date_format(lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.loadingTime!=null and param.loadingTime!=''"> |
|
|
|
|
and date_format(lddl.loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%') |
|
|
|
|
and lddl.date_format(loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|
<select id="selectmarketNub" resultType="java.lang.Integer"> |
|
|
|
|
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list |
|
|
|
|
SELECT COALESCE(COUNT(*), 0) FROM logpm_distribution_delivery_list lddl |
|
|
|
|
<where> |
|
|
|
|
type = '1' |
|
|
|
|
lddl.type = '1' |
|
|
|
|
<if test="param.trainNumber != null and param.trainNumber!=''"> |
|
|
|
|
and lddl.train_number like concat('%',#{param.trainNumber},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.warehouseName != null and param.warehouseName!=''"> |
|
|
|
|
and warehouse_name like concat('%',#{param.warehouseName},'%') |
|
|
|
|
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.vehicleName != null and param.vehicleName!=''"> |
|
|
|
|
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.driverName != null and param.driverName!=''"> |
|
|
|
|
and lddl.driver_name like concat('%',#{param.driverName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.kind != null and param.kind!=''"> |
|
|
|
|
and kind = #{param.kind} |
|
|
|
|
and lddl.kind = #{param.kind} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.distributionCompany != null and param.distributionCompany!=''"> |
|
|
|
|
and distribution_company = #{param.distributionCompany} |
|
|
|
|
and lddl.distribution_company = #{param.distributionCompany} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.type != null and param.type!=''"> |
|
|
|
|
and lddl.type = #{param.type} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.state != null and param.state!=''"> |
|
|
|
|
and state = #{param.state} |
|
|
|
|
and lddl.state = #{param.state} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.createTime_query!=null and param.createTime_query!=''"> |
|
|
|
|
and date_format(create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%') |
|
|
|
|
and lddl.date_format(create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.leadTime!=null and param.leadTime!=''"> |
|
|
|
|
and date_format(lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%') |
|
|
|
|
and lddl.date_format(lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.loadingTime!=null and param.loadingTime!=''"> |
|
|
|
|
and date_format(loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%') |
|
|
|
|
and lddl.date_format(loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
@ -204,26 +252,38 @@
|
|
|
|
|
|
|
|
|
|
<where> |
|
|
|
|
lddl.type = '1' |
|
|
|
|
<if test="param.trainNumber != null and param.trainNumber!=''"> |
|
|
|
|
and lddl.train_number like concat('%',#{param.trainNumber},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.warehouseName != null and param.warehouseName!=''"> |
|
|
|
|
and lddl.warehouse_name like concat('%',#{param.warehouseName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.vehicleName != null and param.vehicleName!=''"> |
|
|
|
|
and lddl.vehicle_name like concat('%',#{param.vehicleName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.driverName != null and param.driverName!=''"> |
|
|
|
|
and lddl.driver_name like concat('%',#{param.driverName},'%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.kind != null and param.kind!=''"> |
|
|
|
|
and lddl.kind = #{param.kind} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.distributionCompany != null and param.distributionCompany!=''"> |
|
|
|
|
and lddl.distribution_company = #{param.distributionCompany} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.type != null and param.type!=''"> |
|
|
|
|
and lddl.type = #{param.type} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.state != null and param.state!=''"> |
|
|
|
|
and lddl.state = #{param.state} |
|
|
|
|
</if> |
|
|
|
|
<if test="param.createTime_query!=null and param.createTime_query!=''"> |
|
|
|
|
and date_format(lddl.create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%') |
|
|
|
|
and lddl.date_format(create_time,'%y%m%d%') = date_format(#{param.createTime_query},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.leadTime!=null and param.leadTime!=''"> |
|
|
|
|
and date_format(lddl.lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%') |
|
|
|
|
and lddl.date_format(lead_time,'%y%m%d%') = date_format(#{param.leadTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
<if test="param.loadingTime!=null and param.loadingTime!=''"> |
|
|
|
|
and date_format(lddl.loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%') |
|
|
|
|
and lddl.date_format(loading_time,'%y%m%d%') = date_format(#{param.loadingTime},'%y%m%d%') |
|
|
|
|
</if> |
|
|
|
|
</where> |
|
|
|
|
</select> |
|
|
|
|