md
This commit is contained in:
parent
7f34eed37f
commit
f054be3367
@ -45,9 +45,9 @@ public class EmisWaybill extends BaseEntity
|
||||
private String billCode;
|
||||
/* 子单号,逗号隔开 */
|
||||
private String billCodeSub;
|
||||
/* 订单状态 未接单、已转单、未指派、已指派订单、已揽收、订单取消 */
|
||||
/* 订单状态 字典 */
|
||||
private String orderStatus;
|
||||
/* 运单状态 已揽收 ,已发件,已到件,已派件,已签收 ,异常回退 */
|
||||
/* 运单状态 字典 */
|
||||
private String waybillStatus;
|
||||
/* 订单类型 0-预报订单 1-正式订单 */
|
||||
private String orderType;
|
||||
@ -120,7 +120,7 @@ public class EmisWaybill extends BaseEntity
|
||||
private String sendPcd;
|
||||
/* 支付方式 : 现金或月结 */
|
||||
private String paymentType;
|
||||
/* 计费方式 01-按重量 02-按体积 03-一口价 */
|
||||
/* 计费方式 1-按重量 2-按体积 3-一口价 */
|
||||
private String calcFeeType;
|
||||
/* 支付月结编号 */
|
||||
private String custNo;
|
||||
@ -317,8 +317,12 @@ public class EmisWaybill extends BaseEntity
|
||||
private String operateEmployeeCode;
|
||||
/* 是否问题件 1-是 0-否 */
|
||||
private String blIsQuestion;
|
||||
/* 问题件类型 */
|
||||
private String problemType;
|
||||
/* 问题件原因 */
|
||||
private String problemCause;
|
||||
/* 问题件延期天数 */
|
||||
private Integer problemDelayDays;
|
||||
/* 是否给寄件人发短信 */
|
||||
private String blMessage;
|
||||
/* 是否给收件人发短信 */
|
||||
|
||||
@ -10,9 +10,12 @@
|
||||
*/
|
||||
package com.xdadan.erp.emis.mapper;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.xdadan.erp.emis.domain.EmisNotCalcAging;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @ClassName EmisNotCalcAgingMapper
|
||||
* @Description <p> 不计时效维护 Mapper 接口 </p>
|
||||
@ -67,4 +70,7 @@ public interface EmisNotCalcAgingMapper extends BaseMapper<EmisNotCalcAging>
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisNotCalcAgingByIds(Long[] ids);
|
||||
|
||||
|
||||
public int getNotCalcAgingDays(@Param("recieveCountry") String destCountry,@Param("sendCountry") String sendCountry, @Param("startDate") Date startDate, @Param("startDate") Date endDate );
|
||||
}
|
||||
|
||||
@ -0,0 +1,166 @@
|
||||
/**
|
||||
* @Project: emis
|
||||
* @Title: EmisWaybillServiceImpl.java
|
||||
* @author linfso
|
||||
* @date 2024-02-29 08:15:14
|
||||
* @Copyright: ShangHai Duta 2022 All rights reserved.
|
||||
* @version v1.0
|
||||
* @Description: <p> 运单列表 实体类 </p>
|
||||
*/
|
||||
|
||||
package com.xdadan.erp.emis.service;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.xdadan.erp.common.utils.DateUtils;
|
||||
import com.xdadan.erp.common.utils.SecurityUtils;
|
||||
import com.xdadan.erp.emis.domain.*;
|
||||
import com.xdadan.erp.emis.domain.vo.WaybillOrder;
|
||||
import com.xdadan.erp.emis.mapper.EmisNotCalcAgingMapper;
|
||||
import com.xdadan.erp.emis.mapper.EmisTransLineMapper;
|
||||
import com.xdadan.erp.emis.mapper.EmisTransProductMapper;
|
||||
import com.xdadan.erp.emis.mapper.EmisWaybillMapper;
|
||||
import com.xdadan.erp.emis.service.IEmisWaybillAttachmentService;
|
||||
import com.xdadan.erp.emis.service.IEmisWaybillCargoService;
|
||||
import com.xdadan.erp.emis.service.IEmisWaybillFeeitemService;
|
||||
import com.xdadan.erp.emis.service.IEmisWaybillService;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 运单列表Service业务层处理
|
||||
*
|
||||
* @author linfso
|
||||
* @date 2024-02-29 08:15:14
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class EmisBaseService {
|
||||
@Autowired
|
||||
protected EmisWaybillMapper emisWaybillMapper;
|
||||
|
||||
@Autowired
|
||||
protected IEmisWaybillFeeitemService emisWaybillFeeitemMapper;
|
||||
|
||||
@Autowired
|
||||
protected IEmisWaybillCargoService emisWaybillCargoMapper;
|
||||
|
||||
@Autowired
|
||||
protected IEmisWaybillAttachmentService emisWaybillAttachmentMapper;
|
||||
|
||||
@Autowired
|
||||
protected EmisTransLineMapper emisTransLineMapper;
|
||||
|
||||
@Autowired
|
||||
protected EmisTransProductMapper emisTransProductMapper;
|
||||
|
||||
@Autowired
|
||||
private EmisNotCalcAgingMapper emisNotCalcAgingMapper;
|
||||
|
||||
|
||||
public EmisTransLine getTransLineByCode(String code) {
|
||||
QueryWrapper<EmisTransLine> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("line_code", code);
|
||||
return emisTransLineMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
public EmisTransProduct getTransProductByCode(String code) {
|
||||
QueryWrapper<EmisTransProduct> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("prod_code", code);
|
||||
return emisTransProductMapper.selectOne(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 计算预估到达时间
|
||||
* @param emisWaybill
|
||||
* @return
|
||||
*/
|
||||
/**
|
||||
*
|
||||
* @param startDate
|
||||
* @param prodCode
|
||||
* @param receiveCountry
|
||||
* @param sendCountry
|
||||
* @return
|
||||
*/
|
||||
public Date getEstimateDate(Date startDate,String prodCode,String receiveCountry,String sendCountry) {
|
||||
Date estDate = null;
|
||||
|
||||
// EmisWaybill emisWaybill
|
||||
// Date startDate = emisWaybill.getSendDate();
|
||||
// 获取产品最大时效
|
||||
EmisTransProduct emisTransProduct = getTransProductByCode(prodCode);
|
||||
|
||||
// 预估到达时间 startData+最大时效
|
||||
Date endDate = DateUtils.addDays(startDate, emisTransProduct.getMaxAging());
|
||||
|
||||
// 计算周末
|
||||
int weekDays = computeWeekDays(startDate,endDate,true);
|
||||
|
||||
// 计算不计较时效的时间
|
||||
int notCaclDays=emisNotCalcAgingMapper.getNotCalcAgingDays(receiveCountry,sendCountry,startDate,endDate);
|
||||
|
||||
int totalDays=emisTransProduct.getMaxAging()+weekDays+notCaclDays;
|
||||
log.info("计算预估到达时间:[maxAging="+emisTransProduct.getMaxAging()+",weekDays="+weekDays+",notCaclDays="+notCaclDays);
|
||||
// 预估达到时间
|
||||
estDate = DateUtils.addDays(startDate, totalDays);
|
||||
|
||||
return estDate;
|
||||
|
||||
}
|
||||
|
||||
public static int computeWeekDays(Date t1,Date t2,boolean isSingleDayoff){
|
||||
Calendar cal1 = Calendar.getInstance();
|
||||
Calendar cal2 = Calendar.getInstance();
|
||||
|
||||
cal1.setTime(t1);
|
||||
cal2.setTime(t2);
|
||||
|
||||
//确定一个 大日期
|
||||
if(cal1.compareTo(cal2) > 0){
|
||||
Calendar temp = cal1;
|
||||
cal1 = cal2;
|
||||
cal2 = temp;
|
||||
temp = null;
|
||||
}
|
||||
int weekDays = 0;
|
||||
while(cal1.compareTo(cal2)<=0){
|
||||
|
||||
if(cal1.get(
|
||||
Calendar.DAY_OF_WEEK)==Calendar.SUNDAY
|
||||
|| ( cal1.get(Calendar.DAY_OF_WEEK)==Calendar.SATURDAY && !isSingleDayoff)
|
||||
){
|
||||
weekDays++;
|
||||
}
|
||||
cal1.add(Calendar.DAY_OF_YEAR,1);
|
||||
}
|
||||
return weekDays;
|
||||
}
|
||||
|
||||
public static void main(String[] args) {
|
||||
Date startDate = new Date();
|
||||
Date endDate = DateUtils.addDays(startDate, 10);
|
||||
int weekDays = computeWeekDays(startDate,endDate,true);
|
||||
// System.out.println("周末:"+new SimpleDateFormat("yyyy-MM-dd").format(cal1.getTime()));
|
||||
|
||||
System.out.println(startDate);
|
||||
System.out.println(endDate);
|
||||
|
||||
System.out.println(weekDays);
|
||||
}
|
||||
|
||||
}
|
||||
@ -20,18 +20,19 @@ import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Singleton;
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import cn.hutool.core.util.IdUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.xdadan.erp.common.utils.DBUtil;
|
||||
import com.xdadan.erp.common.utils.DateUtils;
|
||||
import com.xdadan.erp.common.utils.SecurityUtils;
|
||||
import com.xdadan.erp.emis.domain.EmisWaybillAttachment;
|
||||
import com.xdadan.erp.emis.domain.EmisWaybillCargo;
|
||||
import com.xdadan.erp.emis.domain.EmisWaybillFeeitem;
|
||||
import com.xdadan.erp.emis.domain.*;
|
||||
import com.xdadan.erp.emis.domain.vo.*;
|
||||
import com.xdadan.erp.emis.mapper.EmisTransLineMapper;
|
||||
import com.xdadan.erp.emis.service.*;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xdadan.erp.emis.domain.EmisWaybill;
|
||||
import com.xdadan.erp.emis.mapper.EmisWaybillMapper;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
@ -42,8 +43,10 @@ import org.springframework.util.CollectionUtils;
|
||||
* @author linfso
|
||||
* @date 2024-02-29 08:15:14
|
||||
*/
|
||||
|
||||
@Service
|
||||
public class EmisWaybillServiceImpl implements IEmisWaybillService
|
||||
@Slf4j
|
||||
public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWaybillService
|
||||
{
|
||||
@Autowired
|
||||
private EmisWaybillMapper emisWaybillMapper;
|
||||
@ -59,6 +62,9 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService
|
||||
@Autowired
|
||||
private IEmisWaybillAttachmentService emisWaybillAttachmentMapper;
|
||||
|
||||
@Autowired
|
||||
private EmisTransLineMapper emisTransLineMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 精准查询 查询运单列表 by billCode
|
||||
@ -254,6 +260,49 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService
|
||||
emisWaybillSave.setDispatchSiteCode(emisWaybillSave.getDispatchUnderlingSiteCode());
|
||||
|
||||
|
||||
emisWaybillSave.setOrderStatus("0");
|
||||
emisWaybillSave.setWaybillStatus("0");
|
||||
|
||||
emisWaybillSave.setOrderType("1");
|
||||
|
||||
// 获取泡重比
|
||||
EmisTransLine emisTransLine = getTransLineByCode(emisWaybillSave.getTransLineType());
|
||||
emisWaybillSave.setMeterType(emisTransLine.getMeterRate());
|
||||
|
||||
// 时效
|
||||
EmisTransProduct emisTransProduct = getTransProductByCode(emisWaybillSave.getProductType());
|
||||
emisWaybillSave.setTimeType(emisTransProduct.getAgingDesc());
|
||||
|
||||
if(emisWaybillSave.getSendDate()==null){
|
||||
emisWaybillSave.setSendDate(new Date());
|
||||
}
|
||||
Date estDate = getEstimateDate(emisWaybillSave.getSendDate(),emisWaybillSave.getProductType(),emisWaybillSave.getSendCountry(),emisWaybillSave.getReceiveCountry());
|
||||
|
||||
// 预计到达时间
|
||||
log.info("预估到达时间==>"+ DateUtils.dateTime(estDate));
|
||||
emisWaybillSave.setEstimateDate(estDate);
|
||||
|
||||
// 子单号
|
||||
if("1".equals(emisWaybillSave.getBlGenSubbill()) ){
|
||||
// 子单号拼接
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(int i=0;i<emisWaybillSave.getParcelQty().intValue();i++){
|
||||
sb.append(emisWaybillSave.getBillCode()+StringUtils.leftPad(String.valueOf(i),4,"0")+",");
|
||||
}
|
||||
emisWaybillSave.setBillCodeSub(sb.toString());
|
||||
}
|
||||
|
||||
// 物品名称
|
||||
if(StringUtils.isEmpty(emisWaybillSave.getGoodsInfo())){
|
||||
if(!CollectionUtils.isEmpty(emisWaybillSave.getCargoList()) ){
|
||||
StringBuilder sb = new StringBuilder();
|
||||
for(EmisWaybillCargo cargo:emisWaybillSave.getCargoList()){
|
||||
sb.append(cargo.getGoodsName()+",");
|
||||
}
|
||||
emisWaybillSave.setGoodsInfo(sb.toString());
|
||||
}
|
||||
}
|
||||
|
||||
emisWaybillMapper.insertEmisWaybill(emisWaybillSave);
|
||||
|
||||
// 产生主键插入其他数据
|
||||
@ -308,10 +357,23 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService
|
||||
// 获取结算重量
|
||||
// emisWaybill.getSettlementWeight().floatValue();
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
// @Override
|
||||
// public int calcSettledWeight(EmisWaybill emisWaybill) throws Exception {
|
||||
//
|
||||
// // 获取资费列表
|
||||
// // 获取结算重量
|
||||
//// emisWaybill.getSettlementWeight().floatValue();
|
||||
//
|
||||
//
|
||||
// return 1;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
|
||||
@ -31,6 +31,10 @@
|
||||
select GROUP_CONCAT(name) from emis_country where FIND_IN_SET(`code`,#{code})
|
||||
</select>
|
||||
|
||||
<select id="getNotCalcAgingDays" parameterType="String" resultType="int">
|
||||
select count(1) from emis_not_calc_aging where ( FIND_IN_SET('-1',country) or FIND_IN_SET(#{recieveCountry},country) or FIND_IN_SET(#{sendCountry},country) ) and no_calc_day <![CDATA[ >= ]]> #{startDate} and no_calc_day <![CDATA[ <= ]]> #{endDate}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEmisNotCalcAgingList" parameterType="EmisNotCalcAging" resultMap="EmisNotCalcAgingResult">
|
||||
<include refid="selectEmisNotCalcAgingVo"/>
|
||||
|
||||
@ -142,7 +142,9 @@
|
||||
<result property="salesmen" column="salesmen" />
|
||||
<result property="operateEmployeeCode" column="operate_employee_code" />
|
||||
<result property="blIsQuestion" column="bl_is_question" />
|
||||
<result property="problemType" column="problem_type" />
|
||||
<result property="problemCause" column="problem_cause" />
|
||||
<result property="problemDelayDays" column="problem_delay_days" />
|
||||
<result property="blMessage" column="bl_message" />
|
||||
<result property="blAcceptMessage" column="bl_accept_message" />
|
||||
<result property="blGenSubbill" column="bl_gen_subbill" />
|
||||
@ -164,9 +166,24 @@
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisWaybillVo">
|
||||
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, receive_customer_code, receive_customer_name, third_customer_code, third_customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, trans_line_type, product_type, time_type, meter_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, fee_weight, freight, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_cause, bl_message, bl_accept_message, bl_gen_subbill, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_waybill
|
||||
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, receive_customer_code, receive_customer_name, third_customer_code, third_customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, trans_line_type, product_type, time_type, meter_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, fee_weight, freight, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_type, problem_cause, problem_delay_days, bl_message, bl_accept_message, bl_gen_subbill, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_waybill
|
||||
</sql>
|
||||
|
||||
<select id="selectEmisWaybillByBillCode" parameterType="String" resultMap="EmisWaybillResult">
|
||||
<include refid="selectEmisWaybillVo"/>
|
||||
<where>
|
||||
bill_code = #{billCode}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWaybillByOrderSn" parameterType="String" resultMap="EmisWaybillResult">
|
||||
<include refid="selectEmisWaybillVo"/>
|
||||
<where>
|
||||
order_sn = #{orderSn}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEmisWaybillList" parameterType="EmisWaybill" resultMap="EmisWaybillResult">
|
||||
<include refid="selectEmisWaybillVo"/>
|
||||
<where>
|
||||
@ -307,7 +324,9 @@
|
||||
<if test="salesmen != null and salesmen != ''"> and salesmen like concat('%', #{salesmen}, '%')</if>
|
||||
<if test="operateEmployeeCode != null and operateEmployeeCode != ''"> and operate_employee_code like concat('%', #{operateEmployeeCode}, '%')</if>
|
||||
<if test="blIsQuestion != null and blIsQuestion != ''"> and bl_is_question like concat('%', #{blIsQuestion}, '%')</if>
|
||||
<if test="problemType != null and problemType != ''"> and problem_type like concat('%', #{problemType}, '%')</if>
|
||||
<if test="problemCause != null and problemCause != ''"> and problem_cause like concat('%', #{problemCause}, '%')</if>
|
||||
<if test="problemDelayDays != null "> and problem_delay_days = #{problemDelayDays}</if>
|
||||
<if test="blMessage != null and blMessage != ''"> and bl_message like concat('%', #{blMessage}, '%')</if>
|
||||
<if test="blAcceptMessage != null and blAcceptMessage != ''"> and bl_accept_message like concat('%', #{blAcceptMessage}, '%')</if>
|
||||
<if test="blGenSubbill != null and blGenSubbill != ''"> and bl_gen_subbill like concat('%', #{blGenSubbill}, '%')</if>
|
||||
@ -330,21 +349,8 @@
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWaybillByBillCode" parameterType="String" resultMap="EmisWaybillResult">
|
||||
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, receive_customer_code, receive_customer_name, third_customer_code, third_customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, trans_line_type, product_type, time_type, meter_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, fee_weight, freight, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_cause, bl_message, bl_accept_message, bl_gen_subbill, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
from emis_waybill a
|
||||
where a.bill_code = #{billCode}
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWaybillByOrderSn" parameterType="String" resultMap="EmisWaybillResult">
|
||||
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, receive_customer_code, receive_customer_name, third_customer_code, third_customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, trans_line_type, product_type, time_type, meter_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, fee_weight, freight, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_cause, bl_message, bl_accept_message, bl_gen_subbill, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
from emis_waybill a
|
||||
where a.order_sn = #{orderSn}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectEmisWaybillById" parameterType="Long" resultMap="EmisWaybillResult">
|
||||
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, receive_customer_code, receive_customer_name, third_customer_code, third_customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, trans_line_type, product_type, time_type, meter_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, fee_weight, freight, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_cause, bl_message, bl_accept_message, bl_gen_subbill, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date, user_id, customer_code, customer_name, receive_customer_code, receive_customer_name, third_customer_code, third_customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel, receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode, receive_pcd, send_name, send_company, send_mobile, send_tel, send_country, send_province, send_city, send_county, send_town, send_address, send_postcode, send_pcd, payment_type, calc_fee_type, cust_no, trans_line_type, product_type, time_type, meter_type, customs_clear, customs_eclaration, estimate_date, pack_type, dispatch_method, pickup_method, pick_start_date, pick_finish_date, pick_fail_reason, into_warehouse_code, into_warehouse_name, into_warehouse_address, into_warehouse_contact, into_warehouse_phone, into_warehouse_bill_code, warehouse_in_no, customer_delivery_begin_time, customer_delivery_end_time, goods_type, goods_info, goods_pics, bl_prepare_in_freight, prepare_in_est_fee, prepare_in_real_fee, prepare_in_express, prepare_in_bill_code, prepare_in_remark, prepare_in_supplier, total_weight, total_volume, parcel_qty, bill_weight, volume_weight, currency, settlement_weight, fee_weight, freight, bl_over_long, bl_bill, bl_bill_text, bl_over_weight, over_weight_number, fee_remaker, third_code, real_value, bl_insure, insure_value, insure_value_currency, insure_fee_currency, insure_fee, insure_remark, insure_site_code, insure_date, bl_print, print_man_code, print_site, print_date, print_count, bl_disp_fd, transfer_code, transfer_billcode, disp_fd_date, disp_fd_reason, current_site_code, next_site_code, last_site_code, register_site_code, register_date, register_man_code, take_piece_employee_code, send_site_code, send_date, dispatch_man_code, dispatch_date, dispatch_site_code, produce_bill_date, produce_bill_site_code, produce_bill_man_code, destination_code, destination_province, destination_city, destination_county, dispatch_underling_site_code, destination_center_code, market_man_code, payee, salesmen, operate_employee_code, bl_is_question, problem_type, problem_cause, problem_delay_days, bl_message, bl_accept_message, bl_gen_subbill, sign_man, sign_man_code, sign_site_code, sign_date, bill_pic_send_rmk, bill_pic_dispatch_rmk, timezone_offset, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
from emis_waybill a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
@ -489,7 +495,9 @@
|
||||
<if test="salesmen != null and salesmen != ''">salesmen,</if>
|
||||
<if test="operateEmployeeCode != null and operateEmployeeCode != ''">operate_employee_code,</if>
|
||||
<if test="blIsQuestion != null and blIsQuestion != ''">bl_is_question,</if>
|
||||
<if test="problemType != null and problemType != ''">problem_type,</if>
|
||||
<if test="problemCause != null and problemCause != ''">problem_cause,</if>
|
||||
<if test="problemDelayDays != null">problem_delay_days,</if>
|
||||
<if test="blMessage != null and blMessage != ''">bl_message,</if>
|
||||
<if test="blAcceptMessage != null and blAcceptMessage != ''">bl_accept_message,</if>
|
||||
<if test="blGenSubbill != null and blGenSubbill != ''">bl_gen_subbill,</if>
|
||||
@ -647,7 +655,9 @@
|
||||
<if test="salesmen != null and salesmen != ''">#{salesmen},</if>
|
||||
<if test="operateEmployeeCode != null and operateEmployeeCode != ''">#{operateEmployeeCode},</if>
|
||||
<if test="blIsQuestion != null and blIsQuestion != ''">#{blIsQuestion},</if>
|
||||
<if test="problemType != null and problemType != ''">#{problemType},</if>
|
||||
<if test="problemCause != null and problemCause != ''">#{problemCause},</if>
|
||||
<if test="problemDelayDays != null">#{problemDelayDays},</if>
|
||||
<if test="blMessage != null and blMessage != ''">#{blMessage},</if>
|
||||
<if test="blAcceptMessage != null and blAcceptMessage != ''">#{blAcceptMessage},</if>
|
||||
<if test="blGenSubbill != null and blGenSubbill != ''">#{blGenSubbill},</if>
|
||||
@ -672,7 +682,12 @@
|
||||
<update id="updateEmisWaybill" parameterType="EmisWaybill">
|
||||
update emis_waybill
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="orderSn != null and orderSn != ''">order_sn = #{orderSn},</if>
|
||||
<if test="custOrderId != null and custOrderId != ''">cust_order_id = #{custOrderId},</if>
|
||||
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
||||
<if test="billCodeSub != null and billCodeSub != ''">bill_code_sub = #{billCodeSub},</if>
|
||||
<if test="orderStatus != null and orderStatus != ''">order_status = #{orderStatus},</if>
|
||||
<if test="waybillStatus != null and waybillStatus != ''">waybill_status = #{waybillStatus},</if>
|
||||
<if test="orderType != null and orderType != ''">order_type = #{orderType},</if>
|
||||
<if test="orderDate != null">order_date = #{orderDate},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
@ -803,7 +818,9 @@
|
||||
<if test="salesmen != null and salesmen != ''">salesmen = #{salesmen},</if>
|
||||
<if test="operateEmployeeCode != null and operateEmployeeCode != ''">operate_employee_code = #{operateEmployeeCode},</if>
|
||||
<if test="blIsQuestion != null and blIsQuestion != ''">bl_is_question = #{blIsQuestion},</if>
|
||||
<if test="problemType != null and problemType != ''">problem_type = #{problemType},</if>
|
||||
<if test="problemCause != null and problemCause != ''">problem_cause = #{problemCause},</if>
|
||||
<if test="problemDelayDays != null">problem_delay_days = #{problemDelayDays},</if>
|
||||
<if test="blMessage != null and blMessage != ''">bl_message = #{blMessage},</if>
|
||||
<if test="blAcceptMessage != null and blAcceptMessage != ''">bl_accept_message = #{blAcceptMessage},</if>
|
||||
<if test="blGenSubbill != null and blGenSubbill != ''">bl_gen_subbill = #{blGenSubbill},</if>
|
||||
@ -827,11 +844,11 @@
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisWaybillById" parameterType="Long">
|
||||
delete from emis_waybill where id = #{id}
|
||||
update emis_waybill set del_flag='1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisWaybillByIds" parameterType="String">
|
||||
delete from emis_waybill where id in
|
||||
update emis_waybill set del_flag='1 where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user