md
This commit is contained in:
parent
63e3b8d797
commit
c11c00e520
@ -15,6 +15,9 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Singleton;
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
@ -53,15 +56,6 @@ public class EmisWaybillController extends BaseController
|
||||
@Autowired
|
||||
private IEmisWaybillService emisWaybillService;
|
||||
|
||||
@Autowired
|
||||
private IEmisWaybillFeeitemService emisWaybillFeeitemService;
|
||||
|
||||
@Autowired
|
||||
private IEmisWaybillCargoService emisWaybillCargoService;
|
||||
|
||||
@Autowired
|
||||
private IEmisWaybillAttachmentService emisWaybillAttachmentService;
|
||||
|
||||
@Autowired
|
||||
private IEmisElectronicPagService emisElectronicPagService;
|
||||
|
||||
@ -70,106 +64,21 @@ public class EmisWaybillController extends BaseController
|
||||
* 获取电子运单信息
|
||||
*/
|
||||
@PostMapping(value = "/getWaybillDetail")
|
||||
public AjaxResult getWaybillDetail(@RequestParam("billCode")String billCode, @RequestParam("orderSn")String orderSn )
|
||||
public AjaxResult getWaybillDetail(@RequestParam("billCode")String billCode )
|
||||
{
|
||||
try {
|
||||
// String waybillNo = emisElectronicPagService.realMatchWaybill();
|
||||
|
||||
EmisWaybill emisWaybill=null;
|
||||
|
||||
if(StringUtils.isEmpty(billCode) && StringUtils.isEmpty(orderSn) ){
|
||||
WaybillOrder waybillOrder=null;
|
||||
if(StringUtils.isEmpty(billCode) ){
|
||||
return AjaxResult.error("参数错误");
|
||||
}
|
||||
|
||||
if(!StringUtils.isEmpty(billCode) ){
|
||||
emisWaybill = emisWaybillService.selectEmisWaybillByBillCode(billCode);
|
||||
if(emisWaybill==null){
|
||||
return AjaxResult.error("未找到该运单");
|
||||
}
|
||||
}else {
|
||||
if (!StringUtils.isEmpty(orderSn)) {
|
||||
emisWaybill = emisWaybillService.selectEmisWaybillByOrderSn(orderSn);
|
||||
if (emisWaybill == null) {
|
||||
return AjaxResult.error("未找到该运单");
|
||||
}
|
||||
waybillOrder = emisWaybillService.getWaybillDetail(billCode);
|
||||
if(waybillOrder==null){
|
||||
return AjaxResult.error("运单不存在");
|
||||
}
|
||||
}
|
||||
|
||||
if (emisWaybill == null) {
|
||||
return AjaxResult.error("未找到该运单");
|
||||
}
|
||||
|
||||
// 基础信息
|
||||
WaybillOrder waybillOrder = new WaybillOrder();
|
||||
waybillOrder.setBillCode(emisWaybill.getBillCode());
|
||||
|
||||
// 收件人
|
||||
Reciever reciever = new Reciever();
|
||||
reciever.setName(emisWaybill.getReceiveName());
|
||||
|
||||
waybillOrder.setReciever(reciever);
|
||||
// 发件人
|
||||
Sender sender = new Sender();
|
||||
sender.setName(emisWaybill.getSendName());
|
||||
waybillOrder.setSender(sender);
|
||||
|
||||
// @Autowired
|
||||
// private IEmisWaybillFeeitemService emisWaybillFeeitemService;
|
||||
//
|
||||
// @Autowired
|
||||
// private IEmisWaybillCargoService emisWaybillCargoService;
|
||||
//
|
||||
// @Autowired
|
||||
// private IEmisWaybillAttachmentService emisWaybillAttachmentService;
|
||||
|
||||
|
||||
// 收费项 // 查询收费项
|
||||
List<FeeItem> feeItems = new ArrayList<>();
|
||||
EmisWaybillFeeitem queryFeeitem = new EmisWaybillFeeitem();
|
||||
queryFeeitem.setWaybillId(emisWaybill.getId());
|
||||
List<EmisWaybillFeeitem> listFeeItem=emisWaybillFeeitemService.selectEmisWaybillFeeitemList(queryFeeitem);
|
||||
for (EmisWaybillFeeitem feeItem:listFeeItem) {
|
||||
FeeItem item = new FeeItem();
|
||||
item.setFeeCode(feeItem.getFeeCode());
|
||||
item.setFee(feeItem.getFee());
|
||||
item.setOrderNum(feeItem.getOrderNum());
|
||||
feeItems.add(item);
|
||||
}
|
||||
waybillOrder.setFeeItems(feeItems);
|
||||
|
||||
// 货物清单
|
||||
List<Cargo> cargoList = new ArrayList<>();
|
||||
|
||||
EmisWaybillCargo queryCargo = new EmisWaybillCargo();
|
||||
queryCargo.setWaybillId(emisWaybill.getId());
|
||||
List<EmisWaybillCargo> listCargo=emisWaybillCargoService.selectEmisWaybillCargoList(queryCargo);
|
||||
for (EmisWaybillCargo cargoItem:listCargo) {
|
||||
Cargo item = new Cargo();
|
||||
item.setGoodsCode(cargoItem.getGoodsCode());
|
||||
item.setGoodsName(cargoItem.getGoodsName());
|
||||
item.setCargoQty(cargoItem.getCargoQty());
|
||||
cargoList.add(item);
|
||||
}
|
||||
|
||||
waybillOrder.setCargoList(cargoList);
|
||||
|
||||
|
||||
// 附件清单
|
||||
List<Attachment> attachmentList = new ArrayList<>();
|
||||
EmisWaybillAttachment queryAttachment = new EmisWaybillAttachment();
|
||||
queryAttachment.setWaybillId(emisWaybill.getId());
|
||||
List<EmisWaybillAttachment> listAttachment=emisWaybillAttachmentService.selectEmisWaybillAttachmentList(queryAttachment);
|
||||
for (EmisWaybillAttachment attachmentItem:listAttachment) {
|
||||
Attachment item = new Attachment();
|
||||
item.setFileName(attachmentItem.getFileName());
|
||||
item.setFileUrl(attachmentItem.getFileUrl());
|
||||
item.setAttachType(attachmentItem.getAttachType());
|
||||
item.setFileDesc(attachmentItem.getFileDesc());
|
||||
item.setOrderNum(attachmentItem.getOrderNum());
|
||||
attachmentList.add(item);
|
||||
}
|
||||
waybillOrder.setAttachmentList(attachmentList);
|
||||
|
||||
return AjaxResult.success("获取成功",waybillOrder);
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
@ -178,29 +87,21 @@ public class EmisWaybillController extends BaseController
|
||||
}
|
||||
|
||||
// @PreAuthorize("@ss.hasPermi('emis:emisWaybill:add')")
|
||||
@Log(title = "运单下单", businessType = BusinessType.INSERT)
|
||||
@Log(title = "运单实时下单", businessType = BusinessType.INSERT)
|
||||
@PostMapping(value = "/realSubmitOrder")
|
||||
public AjaxResult realSubmitOrder(@RequestBody WaybillOrder waybillOrder)
|
||||
{
|
||||
|
||||
try {
|
||||
EmisWaybill emisWaybill = new EmisWaybill();
|
||||
|
||||
// 如果单号为空,则产生运单号
|
||||
if (StringUtils.isEmpty(waybillOrder.getBillCode())) {
|
||||
emisWaybill.setBillCode(emisElectronicPagService.realMatchWaybill());
|
||||
if(StringUtils.isEmpty(waybillOrder.getBillCode()) ){
|
||||
waybillOrder.setBillCode(emisElectronicPagService.realMatchWaybill());
|
||||
}
|
||||
|
||||
Snowflake snowflake = Singleton.get(Snowflake.class, 1, 1, true);
|
||||
Long orderId = snowflake.nextId();
|
||||
String orderSn = DBUtil.getSeqNoByLen(7);
|
||||
emisWaybill.setOrderSn(orderId.toString());
|
||||
|
||||
int ret = emisWaybillService.insertEmisWaybill(emisWaybill);
|
||||
emisWaybillService.realSubmitOrder(waybillOrder);
|
||||
|
||||
JSONObject jObjOut = new JSONObject();
|
||||
jObjOut.put("billCode", emisWaybill.getBillCode());
|
||||
jObjOut.put("prodName", emisWaybill.getProductType());
|
||||
jObjOut.put("billCode", waybillOrder.getBillCode());
|
||||
jObjOut.put("prodName", waybillOrder.getProductType());
|
||||
|
||||
return AjaxResult.success("下单成功", jObjOut);
|
||||
}catch (Exception ex){
|
||||
|
||||
@ -18,7 +18,7 @@ public class Reciever implements Serializable {
|
||||
/* 市 */
|
||||
private String city;
|
||||
/* 区 */
|
||||
private String district;
|
||||
private String county;
|
||||
/* 城镇 */
|
||||
private String town;
|
||||
/* 地址 */
|
||||
|
||||
@ -19,7 +19,7 @@ public class Sender implements Serializable {
|
||||
/* 市 */
|
||||
private String city;
|
||||
/* 区 */
|
||||
private String district;
|
||||
private String county;
|
||||
/* 城镇 */
|
||||
private String town;
|
||||
/* 地址 */
|
||||
|
||||
@ -34,6 +34,9 @@ public class WaybillOrder implements Serializable {
|
||||
/* 运单号 */
|
||||
private String billCode;
|
||||
|
||||
/* 订单号 */
|
||||
private String orderSn;
|
||||
|
||||
/* 子单号,逗号隔开 */
|
||||
private String billCodeSub;
|
||||
|
||||
|
||||
@ -11,8 +11,9 @@ package com.xdadan.erp.emis.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.xdadan.erp.emis.domain.EmisWaybill;
|
||||
import com.xdadan.erp.emis.domain.vo.WaybillOrder;
|
||||
|
||||
/**
|
||||
/**
|
||||
* @ClassName EmisWaybillService
|
||||
* @Description 运单列表
|
||||
* @author linfso
|
||||
@ -93,4 +94,13 @@ public interface IEmisWaybillService
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteEmisWaybillById(Long id);
|
||||
|
||||
|
||||
public WaybillOrder getWaybillDetail(String billCode);
|
||||
|
||||
public int realSubmitOrder(WaybillOrder waybillOrder) throws Exception;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -10,20 +10,29 @@
|
||||
|
||||
package com.xdadan.erp.emis.service.impl;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.bean.copier.CopyOptions;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.lang.Singleton;
|
||||
import cn.hutool.core.lang.Snowflake;
|
||||
import com.xdadan.erp.common.utils.DBUtil;
|
||||
import com.xdadan.erp.emis.service.IEmisElectronicPagService;
|
||||
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.vo.*;
|
||||
import com.xdadan.erp.emis.service.*;
|
||||
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 com.xdadan.erp.emis.service.IEmisWaybillService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
/**
|
||||
* 运单列表Service业务层处理
|
||||
*
|
||||
* @author linfso
|
||||
@ -37,6 +46,15 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService
|
||||
|
||||
|
||||
|
||||
@Autowired
|
||||
private IEmisWaybillFeeitemService emisWaybillFeeitemMapper;
|
||||
|
||||
@Autowired
|
||||
private IEmisWaybillCargoService emisWaybillCargoMapper;
|
||||
|
||||
@Autowired
|
||||
private IEmisWaybillAttachmentService emisWaybillAttachmentMapper;
|
||||
|
||||
|
||||
/**
|
||||
* 精准查询 查询运单列表 by billCode
|
||||
@ -116,6 +134,9 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService
|
||||
return emisWaybillMapper.deleteEmisWaybillByIds(ids);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除运单列表信息
|
||||
*
|
||||
@ -128,4 +149,210 @@ public class EmisWaybillServiceImpl implements IEmisWaybillService
|
||||
return emisWaybillMapper.deleteEmisWaybillById(id);
|
||||
}
|
||||
|
||||
public static boolean isOutTime(Date data) throws Exception {
|
||||
//24小时
|
||||
long house=60*60*24;
|
||||
//系统当前时间,
|
||||
long currentTime = System.currentTimeMillis()/1000;
|
||||
//业务时间
|
||||
long endTime=data.getTime()/1000;
|
||||
if((endTime + house) < currentTime ){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public WaybillOrder getWaybillDetail(String billCode){
|
||||
|
||||
EmisWaybill emisWaybill = this.selectEmisWaybillByBillCode(billCode);
|
||||
if(emisWaybill==null){
|
||||
return null;
|
||||
}
|
||||
|
||||
// 基础信息
|
||||
WaybillOrder waybillOrder = new WaybillOrder();
|
||||
waybillOrder.setBillCode(billCode);
|
||||
|
||||
// 收件人
|
||||
Reciever reciever = new Reciever();
|
||||
reciever.setName(emisWaybill.getReceiveName());
|
||||
|
||||
waybillOrder.setReciever(reciever);
|
||||
// 发件人
|
||||
Sender sender = new Sender();
|
||||
sender.setName(emisWaybill.getSendName());
|
||||
waybillOrder.setSender(sender);
|
||||
|
||||
// 忽略复制过程中出现的错误
|
||||
CopyOptions options = CopyOptions.create()
|
||||
.setIgnoreError(true);
|
||||
|
||||
// 收费项 // 查询收费项
|
||||
List<FeeItem> feeItems = new ArrayList<>();
|
||||
EmisWaybillFeeitem queryFeeitem = new EmisWaybillFeeitem();
|
||||
queryFeeitem.setWaybillId(emisWaybill.getId());
|
||||
List<EmisWaybillFeeitem> listFeeItem=emisWaybillFeeitemMapper.selectEmisWaybillFeeitemList(queryFeeitem);
|
||||
for (EmisWaybillFeeitem feeItem:listFeeItem) {
|
||||
FeeItem item = new FeeItem();
|
||||
BeanUtil.copyProperties(item,feeItem,options);
|
||||
feeItems.add(item);
|
||||
}
|
||||
waybillOrder.setFeeItems(feeItems);
|
||||
|
||||
// 货物清单
|
||||
List<Cargo> cargoList = new ArrayList<>();
|
||||
|
||||
EmisWaybillCargo queryCargo = new EmisWaybillCargo();
|
||||
queryCargo.setWaybillId(emisWaybill.getId());
|
||||
List<EmisWaybillCargo> listCargo=emisWaybillCargoMapper.selectEmisWaybillCargoList(queryCargo);
|
||||
for (EmisWaybillCargo cargoItem:listCargo) {
|
||||
Cargo item = new Cargo();
|
||||
BeanUtil.copyProperties(item,cargoItem,options);
|
||||
cargoList.add(item);
|
||||
}
|
||||
|
||||
waybillOrder.setCargoList(cargoList);
|
||||
|
||||
// 附件清单
|
||||
List<Attachment> attachmentList = new ArrayList<>();
|
||||
EmisWaybillAttachment queryAttachment = new EmisWaybillAttachment();
|
||||
queryAttachment.setWaybillId(emisWaybill.getId());
|
||||
List<EmisWaybillAttachment> listAttachment=emisWaybillAttachmentMapper.selectEmisWaybillAttachmentList(queryAttachment);
|
||||
for (EmisWaybillAttachment attachmentItem:listAttachment) {
|
||||
Attachment item = new Attachment();
|
||||
BeanUtil.copyProperties(item,attachmentItem,options);
|
||||
attachmentList.add(item);
|
||||
}
|
||||
waybillOrder.setAttachmentList(attachmentList);
|
||||
|
||||
return waybillOrder;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 下单接口
|
||||
* @param waybillOrder
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int realSubmitOrder(WaybillOrder waybillOrder) throws Exception {
|
||||
|
||||
boolean isNew = true;
|
||||
|
||||
// 查询是更新还是新增
|
||||
EmisWaybill emisWaybill =null;
|
||||
|
||||
if( !StringUtils.isEmpty(waybillOrder.getBillCode()) ){
|
||||
emisWaybill = this.selectEmisWaybillByBillCode(waybillOrder.getBillCode());
|
||||
if(emisWaybill!=null){
|
||||
isNew=false;
|
||||
}
|
||||
}
|
||||
|
||||
if( !StringUtils.isEmpty(waybillOrder.getOrderSn()) ){
|
||||
emisWaybill = this.selectEmisWaybillByOrderSn(waybillOrder.getOrderSn());
|
||||
if(emisWaybill!=null){
|
||||
isNew=false;
|
||||
}
|
||||
}
|
||||
|
||||
// 新增
|
||||
if(isNew){
|
||||
emisWaybill = new EmisWaybill();
|
||||
}else{
|
||||
// 判断运单状态,如果已锁账,则不允许修改
|
||||
// 下单超过 24小时
|
||||
if( "1".equals(emisWaybill.getBlBill()) || isOutTime(emisWaybill.getCreateTime()) ) {
|
||||
throw new Exception("已锁账,不允许修改");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (StringUtils.isEmpty(waybillOrder.getOrderSn())) {
|
||||
Snowflake snowflake = Singleton.get(Snowflake.class, 1, 1, true);
|
||||
Long orderId = snowflake.nextId();
|
||||
String orderSn = "TAO" + orderId.toString();
|
||||
emisWaybill.setOrderSn(orderSn);
|
||||
}
|
||||
|
||||
// 收发件人信息
|
||||
if(waybillOrder.getReciever() != null){
|
||||
Reciever reciever = waybillOrder.getReciever();
|
||||
emisWaybill.setReceiveName(reciever.getName());
|
||||
emisWaybill.setReceiveMobile(reciever.getPhone());
|
||||
emisWaybill.setReceiveCountry(reciever.getCountry());
|
||||
emisWaybill.setReceiveProvince(reciever.getProvince());
|
||||
emisWaybill.setReceiveCity(reciever.getCity());
|
||||
emisWaybill.setReceiveCounty(reciever.getCounty());
|
||||
emisWaybill.setReceiveAddress(reciever.getAddress());
|
||||
emisWaybill.setReceivePostcode(reciever.getPostCode());
|
||||
emisWaybill.setReceiveCompany(reciever.getCompany());
|
||||
}
|
||||
|
||||
if(waybillOrder.getSender() != null){
|
||||
Sender sender = waybillOrder.getSender();
|
||||
emisWaybill.setSendName(sender.getName());
|
||||
emisWaybill.setSendMobile(sender.getPhone());
|
||||
emisWaybill.setSendCountry(sender.getCountry());
|
||||
emisWaybill.setSendProvince(sender.getProvince());
|
||||
emisWaybill.setSendCity(sender.getCity());
|
||||
emisWaybill.setSendCounty(sender.getCounty());
|
||||
emisWaybill.setSendAddress(sender.getAddress());
|
||||
emisWaybill.setSendPostcode(sender.getPostCode());
|
||||
emisWaybill.setSendCompany(sender.getCompany());
|
||||
}
|
||||
|
||||
// 基础数据
|
||||
// .setIgnoreNullValue(true) // 忽略源对象属性为空的情况
|
||||
CopyOptions options = CopyOptions.create()
|
||||
.setIgnoreError(true); // 忽略复制过程中出现的错误
|
||||
|
||||
BeanUtil.copyProperties(waybillOrder,emisWaybill,options);
|
||||
|
||||
if(isNew) {
|
||||
// 插入主单
|
||||
emisWaybillMapper.insertEmisWaybill(emisWaybill);
|
||||
}else{
|
||||
emisWaybillMapper.updateEmisWaybill(emisWaybill);
|
||||
}
|
||||
|
||||
// 插入费用
|
||||
if(!CollectionUtil.isNotEmpty(waybillOrder.getFeeItems() )){
|
||||
List<FeeItem> feeItems=waybillOrder.getFeeItems();
|
||||
for (FeeItem feeItem:feeItems) {
|
||||
EmisWaybillFeeitem item = new EmisWaybillFeeitem();
|
||||
BeanUtil.copyProperties(item,feeItem,options);
|
||||
item.setWaybillId(emisWaybill.getId());
|
||||
emisWaybillFeeitemMapper.insertEmisWaybillFeeitem(item);
|
||||
}
|
||||
}
|
||||
|
||||
// 插入商品信息
|
||||
if(!CollectionUtil.isNotEmpty(waybillOrder.getCargoList() )){
|
||||
List<Cargo> cargoList=waybillOrder.getCargoList();
|
||||
for (Cargo cargoItem:cargoList) {
|
||||
EmisWaybillCargo item = new EmisWaybillCargo();
|
||||
BeanUtil.copyProperties(item,cargoItem,options);
|
||||
item.setWaybillId(emisWaybill.getId());
|
||||
emisWaybillCargoMapper.insertEmisWaybillCargo(item);
|
||||
}
|
||||
}
|
||||
|
||||
// 插入附件信息
|
||||
if(!CollectionUtil.isNotEmpty(waybillOrder.getAttachmentList() )){
|
||||
List<Attachment> attachmentList=waybillOrder.getAttachmentList();
|
||||
for (Attachment attachmentItem:attachmentList) {
|
||||
EmisWaybillAttachment item = new EmisWaybillAttachment();
|
||||
BeanUtil.copyProperties(item,attachmentItem,options);
|
||||
item.setWaybillId(emisWaybill.getId());
|
||||
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(item);
|
||||
}
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertEmisWaybill" parameterType="EmisWaybill">
|
||||
<insert id="insertEmisWaybill" parameterType="EmisWaybill" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_waybill
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
@ -633,12 +633,112 @@
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<!-- <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>-->
|
||||
|
||||
<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="orderType != null and orderType != ''">order_type = #{orderType},</if>
|
||||
<if test="orderDate != null">order_date = #{orderDate},</if>
|
||||
<if test="userId != null">user_id = #{userId},</if>
|
||||
<if test="customerCode != null and customerCode != ''">customer_code = #{customerCode},</if>
|
||||
<if test="customerName != null and customerName != ''">customer_name = #{customerName},</if>
|
||||
<if test="openId != null and openId != ''">open_id = #{openId},</if>
|
||||
<if test="receiveName != null and receiveName != ''">receive_name = #{receiveName},</if>
|
||||
<if test="receiveCompany != null and receiveCompany != ''">receive_company = #{receiveCompany},</if>
|
||||
<if test="receiveMobile != null and receiveMobile != ''">receive_mobile = #{receiveMobile},</if>
|
||||
<if test="receiveTel != null and receiveTel != ''">receive_tel = #{receiveTel},</if>
|
||||
<if test="receiveCountry != null and receiveCountry != ''">receive_country = #{receiveCountry},</if>
|
||||
<if test="receiveProvince != null and receiveProvince != ''">receive_province = #{receiveProvince},</if>
|
||||
<if test="receiveCity != null and receiveCity != ''">receive_city = #{receiveCity},</if>
|
||||
<if test="receiveCounty != null and receiveCounty != ''">receive_county = #{receiveCounty},</if>
|
||||
<if test="receiveTown != null and receiveTown != ''">receive_town = #{receiveTown},</if>
|
||||
<if test="receiveAddress != null and receiveAddress != ''">receive_address = #{receiveAddress},</if>
|
||||
<if test="receivePostcode != null and receivePostcode != ''">receive_postcode = #{receivePostcode},</if>
|
||||
<if test="receivePcd != null and receivePcd != ''">receive_pcd = #{receivePcd},</if>
|
||||
<if test="sendName != null and sendName != ''">send_name = #{sendName},</if>
|
||||
<if test="sendCompany != null and sendCompany != ''">send_company = #{sendCompany},</if>
|
||||
<if test="sendMobile != null and sendMobile != ''">send_mobile = #{sendMobile},</if>
|
||||
<if test="sendTel != null and sendTel != ''">send_tel = #{sendTel},</if>
|
||||
<if test="sendCountry != null and sendCountry != ''">send_country = #{sendCountry},</if>
|
||||
<if test="sendProvince != null and sendProvince != ''">send_province = #{sendProvince},</if>
|
||||
<if test="sendCity != null and sendCity != ''">send_city = #{sendCity},</if>
|
||||
<if test="sendCounty != null and sendCounty != ''">send_county = #{sendCounty},</if>
|
||||
<if test="sendTown != null and sendTown != ''">send_town = #{sendTown},</if>
|
||||
<if test="sendAddress != null and sendAddress != ''">send_address = #{sendAddress},</if>
|
||||
<if test="sendPostcode != null and sendPostcode != ''">send_postcode = #{sendPostcode},</if>
|
||||
<if test="sendPcd != null and sendPcd != ''">send_pcd = #{sendPcd},</if>
|
||||
<if test="paymentType != null and paymentType != ''">payment_type = #{paymentType},</if>
|
||||
<if test="calcFeeType != null and calcFeeType != ''">calc_fee_type = #{calcFeeType},</if>
|
||||
<if test="custNo != null and custNo != ''">cust_no = #{custNo},</if>
|
||||
<if test="transLineType != null and transLineType != ''">trans_line_type = #{transLineType},</if>
|
||||
<if test="productType != null and productType != ''">product_type = #{productType},</if>
|
||||
<if test="timeType != null and timeType != ''">time_type = #{timeType},</if>
|
||||
<if test="meterType != null and meterType != ''">meter_type = #{meterType},</if>
|
||||
<if test="customsClear != null and customsClear != ''">customs_clear = #{customsClear},</if>
|
||||
<if test="customsEclaration != null and customsEclaration != ''">customs_eclaration = #{customsEclaration},</if>
|
||||
<if test="estimateDate != null">estimate_date = #{estimateDate},</if>
|
||||
<if test="packType != null and packType != ''">pack_type = #{packType},</if>
|
||||
<if test="dispatchMethod != null and dispatchMethod != ''">dispatch_method = #{dispatchMethod},</if>
|
||||
<if test="pickupMethod != null and pickupMethod != ''">pickup_method = #{pickupMethod},</if>
|
||||
<if test="pickStartDate != null">pick_start_date = #{pickStartDate},</if>
|
||||
<if test="pickFinishDate != null">pick_finish_date = #{pickFinishDate},</if>
|
||||
<if test="pickFailReason != null and pickFailReason != ''">pick_fail_reason = #{pickFailReason},</if>
|
||||
<if test="intoWarehouseCode != null and intoWarehouseCode != ''">into_warehouse_code = #{intoWarehouseCode},</if>
|
||||
<if test="intoWarehouseName != null and intoWarehouseName != ''">into_warehouse_name = #{intoWarehouseName},</if>
|
||||
<if test="intoWarehouseAddress != null and intoWarehouseAddress != ''">into_warehouse_address = #{intoWarehouseAddress},</if>
|
||||
<if test="intoWarehouseContact != null and intoWarehouseContact != ''">into_warehouse_contact = #{intoWarehouseContact},</if>
|
||||
<if test="intoWarehousePhone != null and intoWarehousePhone != ''">into_warehouse_phone = #{intoWarehousePhone},</if>
|
||||
<if test="intoWarehouseBillCode != null and intoWarehouseBillCode != ''">into_warehouse_bill_code = #{intoWarehouseBillCode},</if>
|
||||
<if test="customerDeliveryBeginTime != null and customerDeliveryBeginTime != ''">customer_delivery_begin_time = #{customerDeliveryBeginTime},</if>
|
||||
<if test="customerDeliveryEndTime != null and customerDeliveryEndTime != ''">customer_delivery_end_time = #{customerDeliveryEndTime},</if>
|
||||
<if test="goodsType != null and goodsType != ''">goods_type = #{goodsType},</if>
|
||||
<if test="goodsInfo != null and goodsInfo != ''">goods_info = #{goodsInfo},</if>
|
||||
<if test="totalWeight != null">total_weight = #{totalWeight},</if>
|
||||
<if test="totalVolume != null">total_volume = #{totalVolume},</if>
|
||||
<if test="parcelQty != null">parcel_qty = #{parcelQty},</if>
|
||||
<if test="billWeight != null">bill_weight = #{billWeight},</if>
|
||||
<if test="volumeWeight != null">volume_weight = #{volumeWeight},</if>
|
||||
<if test="currency != null and currency != ''">currency = #{currency},</if>
|
||||
<if test="settlementWeight != null">settlement_weight = #{settlementWeight},</if>
|
||||
<if test="feeWeight != null">fee_weight = #{feeWeight},</if>
|
||||
<if test="freight != null">freight = #{freight},</if>
|
||||
<if test="blOverLong != null and blOverLong != ''">bl_over_long = #{blOverLong},</if>
|
||||
<if test="blOverWeight != null and blOverWeight != ''">bl_over_weight = #{blOverWeight},</if>
|
||||
<if test="overWeightNumber != null and overWeightNumber != ''">over_weight_number = #{overWeightNumber},</if>
|
||||
<if test="feeRemaker != null and feeRemaker != ''">fee_remaker = #{feeRemaker},</if>
|
||||
<if test="thirdCode != null and thirdCode != ''">third_code = #{thirdCode},</if>
|
||||
<if test="realValue != null and realValue != ''">real_value = #{realValue},</if>
|
||||
<if test="registerSiteCode != null and registerSiteCode != ''">register_site_code = #{registerSiteCode},</if>
|
||||
<if test="takePieceEmployeeCode != null and takePieceEmployeeCode != ''">take_piece_employee_code = #{takePieceEmployeeCode},</if>
|
||||
<if test="sendSiteCode != null and sendSiteCode != ''">send_site_code = #{sendSiteCode},</if>
|
||||
<if test="sendDate != null">send_date = #{sendDate},</if>
|
||||
<if test="dispatchSiteCode != null and dispatchSiteCode != ''">dispatch_site_code = #{dispatchSiteCode},</if>
|
||||
<if test="destinationCode != null and destinationCode != ''">destination_code = #{destinationCode},</if>
|
||||
<if test="destinationProvince != null and destinationProvince != ''">destination_province = #{destinationProvince},</if>
|
||||
<if test="destinationCity != null and destinationCity != ''">destination_city = #{destinationCity},</if>
|
||||
<if test="destinationCounty != null and destinationCounty != ''">destination_county = #{destinationCounty},</if>
|
||||
<if test="dispatchUnderlingSiteCode != null and dispatchUnderlingSiteCode != ''">dispatch_underling_site_code = #{dispatchUnderlingSiteCode},</if>
|
||||
<if test="destinationCenterCode != null and destinationCenterCode != ''">destination_center_code = #{destinationCenterCode},</if>
|
||||
<if test="marketManCode != null and marketManCode != ''">market_man_code = #{marketManCode},</if>
|
||||
<if test="payee != null and payee != ''">payee = #{payee},</if>
|
||||
<if test="salesmen != null and salesmen != ''">salesmen = #{salesmen},</if>
|
||||
<if test="operateEmployeeCode != null and operateEmployeeCode != ''">operate_employee_code = #{operateEmployeeCode},</if>
|
||||
<if test="blMessage != null and blMessage != ''">bl_message = #{blMessage},</if>
|
||||
<if test="blAcceptMessage != null and blAcceptMessage != ''">bl_accept_message = #{blAcceptMessage},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="tmpUpdateEmisWaybill" parameterType="EmisWaybill">
|
||||
update emis_waybill
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<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>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user