Merge pull request 'develop' (#298) from develop into master
Reviewed-on: http://git.xdadan.loc/tanex/emis-service/pulls/298
This commit is contained in:
commit
02b339390b
@ -48,6 +48,8 @@ public class EmisTmsScanRecord extends BaseEntity
|
||||
private String orderSn;
|
||||
/* 扫描类型: 收发到派签 */
|
||||
private String scanType;
|
||||
/* 判断轨迹是否结束 1:是 0:否,默认为0 */
|
||||
private String blLastTrack;
|
||||
/* 上下一站点 */
|
||||
@DataAuditField(fieldComment = "上/下一站名称")
|
||||
private String preOrNextStation;
|
||||
|
||||
@ -42,6 +42,7 @@ public enum EmisBizErrorType {
|
||||
SCAN_HAS_SIGN("E604","已签收"),
|
||||
SCAN_HAS_PACK("E605","已组包"),
|
||||
SCAN_NO_ALLOW("E606","不允许操作"),
|
||||
SCAN_CONFIRM_LAST_TRACK("E607","不允许手动完成轨迹"),
|
||||
|
||||
|
||||
BILL_LOCK("E901", "已锁定"),
|
||||
|
||||
@ -24,7 +24,9 @@ public class ScanInfo implements Serializable {
|
||||
|
||||
private String scanType;
|
||||
private Integer opType;
|
||||
private String dataFrom;
|
||||
private String dataFrom;
|
||||
/* 判断轨迹是否结束 1:是 0:否,默认为0 */
|
||||
private String blLastTrack;
|
||||
|
||||
private List<Map<String,Object>> scanData;
|
||||
|
||||
|
||||
@ -3246,15 +3246,17 @@ public class EmisBaseService {
|
||||
|
||||
/**
|
||||
* 改变运单状态
|
||||
*
|
||||
* @param billCode
|
||||
* @param waybillStatus
|
||||
* @param blLastTrack
|
||||
* @return
|
||||
*/
|
||||
public int changeWaybillStatus(String billCode,String waybillStatus){
|
||||
public int changeWaybillStatus(String billCode, String waybillStatus, String blLastTrack){
|
||||
EmisWaybill emisWaybill = new EmisWaybill();
|
||||
emisWaybill.setBillCode(billCode);
|
||||
emisWaybill.setWaybillStatus(waybillStatus);
|
||||
if("50".equals(waybillStatus)){
|
||||
if ("1".equals(blLastTrack) || "50".equals(waybillStatus)) {
|
||||
emisWaybill.setBlSign("1");
|
||||
}
|
||||
return emisWaybillMapper.changeWaybillStatusByBillCode(emisWaybill);
|
||||
|
||||
@ -19,7 +19,6 @@ import com.alibaba.fastjson.JSON;
|
||||
import com.xdadan.erp.common.core.domain.entity.SysUser;
|
||||
import com.xdadan.erp.common.utils.DateUtils;
|
||||
import com.xdadan.erp.common.utils.DictUtils;
|
||||
import com.xdadan.erp.common.utils.ServletUtils;
|
||||
import com.xdadan.erp.emis.domain.*;
|
||||
import com.xdadan.erp.emis.domain.enumtype.*;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
@ -29,14 +28,12 @@ import com.xdadan.erp.emis.domain.vo.scan.ScanResult;
|
||||
import com.xdadan.erp.emis.domain.vo.scan.ScanResultItem;
|
||||
import com.xdadan.erp.emis.mapper.*;
|
||||
import com.xdadan.erp.emis.service.EmisBaseService;
|
||||
import com.xdadan.erp.emis.utils.Kd100Helper;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import jodd.util.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.scheduling.annotation.Async;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.xdadan.erp.emis.service.IEmisTmsScanRecordService;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -200,8 +197,28 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
@Transactional
|
||||
public int deleteEmisTmsScanRecordByIds(Long[] ids)
|
||||
{
|
||||
// 校验:如果扫描记录的blLastTrack=1,需要修改对应运单的bl_sign='0'
|
||||
if (ids != null && ids.length > 0) {
|
||||
for (Long id : ids) {
|
||||
EmisTmsScanRecord record = selectEmisTmsScanRecordById(id);
|
||||
if (record != null && "1".equals(record.getBlLastTrack())) {
|
||||
String mainBillCode = record.getMainBillCode();
|
||||
if (StringUtils.isNotEmpty(mainBillCode)) {
|
||||
EmisWaybill waybill = getWaybillByBillCode(mainBillCode);
|
||||
if (waybill != null) {
|
||||
EmisWaybill updateWaybill = new EmisWaybill();
|
||||
updateWaybill.setBillCode(mainBillCode);
|
||||
updateWaybill.setWaybillStatus(waybill.getWaybillStatus());
|
||||
updateWaybill.setBlSign("0");
|
||||
emisWaybillMapper.changeWaybillStatusByBillCode(updateWaybill);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return emisTmsScanRecordMapper.deleteEmisTmsScanRecordByIds(ids);
|
||||
}
|
||||
|
||||
@ -451,11 +468,13 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
|
||||
/**
|
||||
* 扫描操作
|
||||
*
|
||||
* @param scanType
|
||||
* @param scanDataItem
|
||||
* @param blLastTrack
|
||||
* @return
|
||||
*/
|
||||
public List<ScanResultItem> doScan(String scanType,Map<String,Object> scanDataItem,String scanManCode,String scanSiteCode) {
|
||||
public List<ScanResultItem> doScan(String scanType, Map<String,Object> scanDataItem, String scanManCode, String scanSiteCode, String blLastTrack) {
|
||||
|
||||
List<ScanResultItem> itemList = new ArrayList<>();
|
||||
|
||||
@ -682,6 +701,16 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
EmisWaybill emisWaybill = getWaybillByBillCode(mainBillCode);
|
||||
|
||||
|
||||
if ("1".equals(blLastTrack)) {
|
||||
if (!"2".equals(emisWaybill.getCustomsClear())) {
|
||||
scanResultItem.setResult("fail");
|
||||
scanResultItem.setMessage(emisWaybill.getBillCode() + "清关方式不为自提清关,无法手动完成轨迹");
|
||||
scanResultItem.setErrorCode(EmisBizErrorType.SCAN_CONFIRM_LAST_TRACK.errorCode);
|
||||
itemList.add(scanResultItem);
|
||||
return itemList;
|
||||
}
|
||||
emisTmsScanRecord.setBlLastTrack(blLastTrack);
|
||||
}
|
||||
|
||||
// 填充运单基础数据
|
||||
emisTmsScanRecord.setMainBillCode(emisWaybill.getBillCode());
|
||||
@ -717,7 +746,7 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
|
||||
|
||||
// 修改主运单状态
|
||||
this.changeWaybillStatus(mainBillCode, scanType);
|
||||
this.changeWaybillStatus(mainBillCode, scanType, blLastTrack);
|
||||
scanResultItem.setResult("success");
|
||||
scanResultItem.setErrorCode(EmisBizErrorType.SUCCESS.errorCode);
|
||||
scanResultItem.setMessage("操作成功");
|
||||
@ -2606,7 +2635,7 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
List<ScanResultItem> resultList = new ArrayList<>();
|
||||
if(scanInfo.getOpType()==2){
|
||||
for (Map<String,Object> item: scanInfo.getScanData()) {
|
||||
List<ScanResultItem> itemCheckList=doScan(scanInfo.getScanType(),item,scanManCode,scanSiteCode);
|
||||
List<ScanResultItem> itemCheckList=doScan(scanInfo.getScanType(),item,scanManCode,scanSiteCode,scanInfo.getBlLastTrack());
|
||||
resultList.addAll(itemCheckList);
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,7 +14,6 @@ package com.xdadan.erp.emis.service.impl;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.beust.jcommander.internal.Lists;
|
||||
import com.deepoove.poi.XWPFTemplate;
|
||||
import com.deepoove.poi.config.Configure;
|
||||
import com.deepoove.poi.data.PictureType;
|
||||
@ -24,30 +23,25 @@ package com.xdadan.erp.emis.service.impl;
|
||||
import com.xdadan.erp.common.config.PayConfig;
|
||||
import com.xdadan.erp.common.core.domain.entity.SysUser;
|
||||
import com.xdadan.erp.common.core.redis.RedissonService;
|
||||
import com.xdadan.erp.common.utils.BarcodeUtils;
|
||||
import com.xdadan.erp.common.utils.DateUtils;
|
||||
import com.xdadan.erp.common.utils.DictUtils;
|
||||
import com.xdadan.erp.common.utils.SecurityUtils;
|
||||
import com.xdadan.erp.common.utils.NoticeUtils;
|
||||
import com.xdadan.erp.common.utils.*;
|
||||
import com.xdadan.erp.common.utils.file.FileUploadUtils;
|
||||
import com.xdadan.erp.common.utils.idgen.UUID;
|
||||
import com.xdadan.erp.emis.domain.*;
|
||||
import com.xdadan.erp.emis.domain.enumtype.*;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.emis.domain.vo.WaybillOrder;
|
||||
import com.xdadan.erp.emis.domain.vo.scan.ScanInfo;
|
||||
import com.xdadan.erp.emis.mapper.EmisSalesmenRelMapper;
|
||||
import com.xdadan.erp.emis.domain.EmisSalesmenRel;
|
||||
import com.xdadan.erp.emis.mapper.*;
|
||||
import com.xdadan.erp.emis.service.*;
|
||||
import com.xdadan.erp.emis.domain.*;
|
||||
import com.xdadan.erp.emis.domain.enumtype.*;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.emis.domain.vo.WaybillOrder;
|
||||
import com.xdadan.erp.emis.domain.vo.scan.ScanInfo;
|
||||
import com.xdadan.erp.emis.mapper.*;
|
||||
import com.xdadan.erp.emis.service.*;
|
||||
import com.xdadan.erp.emis.service.print.IXddTplPrint;
|
||||
import com.xdadan.erp.emis.service.print.tanex.TanexPdfPrinter;
|
||||
import com.xdadan.erp.emis.service.warehouse.DocUtils;
|
||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||
import com.xdadan.erp.emis.utils.sensitive.Convert;
|
||||
import com.xdadan.erp.system.domain.SysFileInfo;
|
||||
import com.xdadan.erp.system.service.ISysFileInfoService;
|
||||
import com.xdadan.erp.system.service.ISysNoticeService;
|
||||
import com.xdadan.erp.system.domain.SysFileInfo;
|
||||
import com.xdadan.erp.system.mapper.SysUserMapper;
|
||||
import com.xdadan.erp.system.service.ISysFileInfoService;
|
||||
import com.xdadan.erp.system.service.ISysNoticeService;
|
||||
import jodd.util.StringUtil;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
@ -74,8 +68,8 @@ import com.xdadan.erp.emis.service.*;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.Future;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* 运单列表Service业务层处理
|
||||
@ -163,6 +157,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
@Autowired
|
||||
private EmisMoneyUserMapper emisMoneyUserMapper;
|
||||
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
/**
|
||||
* 保存或更新运单其他信息副表
|
||||
* @param emisWaybillSave
|
||||
@ -6193,10 +6190,10 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
@Override
|
||||
public void autoTraceWarning() {
|
||||
try {
|
||||
// 2025-12-01 00:00:00 之后的运单
|
||||
// 2026-01-01 00:00:00 之后的运单
|
||||
Calendar cal = Calendar.getInstance();
|
||||
cal.set(Calendar.YEAR, 2025);
|
||||
cal.set(Calendar.MONTH, Calendar.DECEMBER);
|
||||
cal.set(Calendar.YEAR, 2026);
|
||||
cal.set(Calendar.MONTH, Calendar.JANUARY);
|
||||
cal.set(Calendar.DAY_OF_MONTH, 1);
|
||||
cal.set(Calendar.HOUR_OF_DAY, 0);
|
||||
cal.set(Calendar.MINUTE, 0);
|
||||
@ -6243,13 +6240,13 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
}
|
||||
|
||||
try {
|
||||
// 收集需要通知的员工编码:销售联系人、销售支持、销售分享人
|
||||
Set<String> notifyEmpCodes = new LinkedHashSet<>();
|
||||
// 收集需要通知的员工姓名:销售联系人、销售支持、销售分享人
|
||||
Set<String> notifyEmpNames = new LinkedHashSet<>();
|
||||
|
||||
// 销售联系人
|
||||
if (!StringUtils.isEmpty(waybill.getSalesmen())) {
|
||||
String salesmen = waybill.getSalesmen();
|
||||
notifyEmpCodes.add(salesmen);
|
||||
notifyEmpNames.add(salesmen);
|
||||
|
||||
// 销售分享关系:salesmen -> salesAss(使用当前批次预加载的关系)
|
||||
List<EmisSalesmenRel> relList = salesRelMap.get(salesmen);
|
||||
@ -6258,37 +6255,61 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
if (rel == null || StringUtils.isEmpty(rel.getSalesAss())) {
|
||||
continue;
|
||||
}
|
||||
notifyEmpCodes.add(rel.getSalesAss());
|
||||
notifyEmpNames.add(rel.getSalesAss());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 销售支持(可能为逗号分隔)
|
||||
if (!StringUtils.isEmpty(waybill.getSalesSupport())) {
|
||||
String[] supports = waybill.getSalesSupport().split("[,,]");
|
||||
// 销售支持
|
||||
EmisWaybillOther waybillOther = waybill.getWaybillOther();
|
||||
if (waybillOther != null && !StringUtils.isEmpty(waybillOther.getSalesSupport())) {
|
||||
String[] supports = waybillOther.getSalesSupport().split("[,,]");
|
||||
for (String support : supports) {
|
||||
if (!StringUtils.isEmpty(support)) {
|
||||
notifyEmpCodes.add(support.trim());
|
||||
notifyEmpNames.add(support.trim());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (notifyEmpNames.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// 根据notifyEmpNames查询sys_user获取所有的notifyEmpCodes
|
||||
Set<String> notifyEmpCodes = new LinkedHashSet<>();
|
||||
for (String empName : notifyEmpNames) {
|
||||
try {
|
||||
SysUser cond = new SysUser();
|
||||
cond.setEmpName(empName);
|
||||
List<SysUser> users = sysUserMapper.selectUserList(cond);
|
||||
if (!CollectionUtils.isEmpty(users)) {
|
||||
for (SysUser u : users) {
|
||||
if (u != null && !StringUtils.isEmpty(u.getEmpCode())) {
|
||||
notifyEmpCodes.add(u.getEmpCode());
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
log.error("autoTraceWarning: query sys_user error, billCode={}, empName={}", waybill.getBillCode(), empName, ex);
|
||||
}
|
||||
}
|
||||
|
||||
if (notifyEmpCodes.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
String empCodeStr = String.join(",", notifyEmpCodes);
|
||||
String billCode = waybill.getBillCode();
|
||||
String timeStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, now);
|
||||
String title = "轨迹异常:运单【" + billCode + "】停留超过3天_" + timeStr;
|
||||
String content = title;
|
||||
String url = "/d24/waybillManagement/WaybillList?billCode=" + billCode;
|
||||
|
||||
try {
|
||||
NoticeUtils.outSendNoticeToInner(title, content, url, empCodeStr, 3);
|
||||
} catch (Exception ex) {
|
||||
log.error("autoTraceWarning: send notice error, billCode={}, empCodes={}", billCode, empCodeStr, ex);
|
||||
}
|
||||
String url = "/d24/waybillManagement/SendWaybillList?billCode=" + billCode;
|
||||
notifyEmpCodes.forEach(empCode -> {
|
||||
try {
|
||||
// String timeStr = DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS, now);
|
||||
String title = "轨迹异常:运单【" + billCode + "】停留超过3天_" + empCode;
|
||||
String content = title;
|
||||
NoticeUtils.outSendNoticeToInner(title, content, url, empCode, 2);
|
||||
} catch (Exception ex) {
|
||||
log.error("autoTraceWarning: send notice error, billCode={}, empCode={}", billCode, empCode, ex);
|
||||
}
|
||||
});
|
||||
} catch (Exception ex) {
|
||||
log.error("autoTraceWarning: handle waybill error, billCode={}", waybill.getBillCode(), ex);
|
||||
}
|
||||
@ -6512,7 +6533,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
int startIndex = remark.indexOf("T7080");
|
||||
if (startIndex != -1) {
|
||||
String subStr = remark.substring(startIndex);
|
||||
java.util.regex.Pattern pattern = java.util.regex.Pattern.compile("T7080\\d+");
|
||||
Pattern pattern = Pattern.compile("T7080\\d+");
|
||||
java.util.regex.Matcher matcher = pattern.matcher(subStr);
|
||||
if (matcher.find()) {
|
||||
return matcher.group();
|
||||
|
||||
@ -164,13 +164,13 @@
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisBaseInvoiceInfoById" parameterType="Long">
|
||||
delete from emis_base_invoice_info where id = #{id}
|
||||
update emis_base_invoice_info set del_flag='1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisBaseInvoiceInfoByIds" parameterType="String">
|
||||
delete from emis_base_invoice_info where id in
|
||||
update emis_base_invoice_info set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@ -175,11 +175,11 @@
|
||||
</update>
|
||||
|
||||
<delete id="deleteEmisCustomerInvoiceInfoById" parameterType="Long">
|
||||
delete from emis_customer_invoice_info where id = #{id}
|
||||
update emis_customer_invoice_info set del_flag='1' where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteEmisCustomerInvoiceInfoByIds" parameterType="String">
|
||||
delete from emis_customer_invoice_info where id in
|
||||
update emis_customer_invoice_info set del_flag='1' where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
<result property="blSubBill" column="bl_sub_bill" />
|
||||
<result property="orderSn" column="order_sn" />
|
||||
<result property="scanType" column="scan_type" />
|
||||
<result property="blLastTrack" column="bl_last_track" />
|
||||
<result property="preOrNextStation" column="pre_or_next_station" />
|
||||
<result property="preOrNextStationCode" column="pre_or_next_station_code" />
|
||||
<result property="preOrNextStationPhone" column="pre_or_next_station_phone" />
|
||||
@ -230,7 +231,7 @@
|
||||
|
||||
<!-- 获取订单最后一条扫描记录 -->
|
||||
<select id="selectLastRecordBaseInfoByBillCode" parameterType="string" resultMap="BaseEmisTmsScanRecordResult">
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, bl_last_track, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
from emis_tms_scan_record a
|
||||
where del_flag='0' and a.main_bill_code = #{billCode}
|
||||
order by create_time desc limit 1
|
||||
@ -239,7 +240,7 @@
|
||||
|
||||
<!-- 获取订单最后一条扫描记录 -->
|
||||
<select id="selectNormalLastScanRecord" parameterType="string" resultMap="BaseEmisTmsScanRecordResult">
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, bl_last_track, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
from emis_tms_scan_record a
|
||||
where del_flag='0' and a.main_bill_code = #{billCode} and scan_type in('10','20','30','40','50')
|
||||
order by create_time desc limit 1
|
||||
@ -272,12 +273,12 @@
|
||||
|
||||
|
||||
<sql id="selectEmisTmsScanRecordVo">
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site from emis_tms_scan_record
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, bl_last_track, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site from emis_tms_scan_record
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectEmisTmsScanRecordList" parameterType="EmisTmsScanRecord" resultMap="EmisTmsScanRecordResult">
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, bl_last_track, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
from emis_tms_scan_record a
|
||||
<where>
|
||||
|
||||
@ -299,6 +300,7 @@
|
||||
</if>
|
||||
|
||||
<if test="scanType != null and scanType != ''"> and scan_type=#{scanType}</if>
|
||||
<if test="blLastTrack != null and blLastTrack != ''">and bl_last_track=#{blLastTrack}</if>
|
||||
<if test="preOrNextStation != null and preOrNextStation != ''"> and pre_or_next_station like concat('%', #{preOrNextStation}, '%')</if>
|
||||
<if test="preOrNextStationCode != null and preOrNextStationCode != ''"> and pre_or_next_station_code=#{preOrNextStationCode}</if>
|
||||
<if test="preOrNextStationPhone != null and preOrNextStationPhone != ''"> and pre_or_next_station_phone like concat('%', #{preOrNextStationPhone}, '%')</if>
|
||||
@ -412,7 +414,7 @@
|
||||
|
||||
|
||||
<select id="selectMonitorScanRecordList" parameterType="EmisTmsScanRecord" resultMap="EmisTmsScanRecordResult">
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, bl_last_track, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
from emis_tms_scan_record a
|
||||
<where>
|
||||
del_flag='0'
|
||||
@ -527,7 +529,7 @@
|
||||
|
||||
|
||||
<select id="selectEmisTmsScanRecordById" parameterType="Long" resultMap="EmisTmsScanRecordResult">
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
select id, bill_code, main_bill_code, bl_sub_bill, order_sn, scan_type, bl_last_track, pre_or_next_station, pre_or_next_station_code, pre_or_next_station_phone, pre_or_next_man_code, pre_or_next_man_phone, scan_date, scan_man_code, scan_man_phone, scan_man, pre_or_next_man, scan_site, scan_site_code, scan_site_phone, scan_weight, weight, dest_site_code, dest_code, dispatch_or_send_man, dispatch_or_send_man_code, dispatch_or_send_man_phone, sign_date, sign_man, sign_site, sign_site_code, record_man, record_man_code, record_man_phone, record_site_code, car_no, bag_no, truck_man, truck_code, data_from, pic_url, public_trace_info, inner_trace_info, rel_id, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
from emis_tms_scan_record a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
@ -541,6 +543,7 @@
|
||||
<if test="blSubBill != null and blSubBill != ''">bl_sub_bill,</if>
|
||||
<if test="orderSn != null and orderSn != ''">order_sn,</if>
|
||||
<if test="scanType != null and scanType != ''">scan_type,</if>
|
||||
<if test="blLastTrack != null and blLastTrack != ''">bl_last_track,</if>
|
||||
<if test="preOrNextStation != null and preOrNextStation != ''">pre_or_next_station,</if>
|
||||
<if test="preOrNextStationCode != null and preOrNextStationCode != ''">pre_or_next_station_code,</if>
|
||||
<if test="preOrNextStationPhone != null and preOrNextStationPhone != ''">pre_or_next_station_phone,</if>
|
||||
@ -595,6 +598,7 @@
|
||||
<if test="blSubBill != null and blSubBill != ''">#{blSubBill},</if>
|
||||
<if test="orderSn != null and orderSn != ''">#{orderSn},</if>
|
||||
<if test="scanType != null and scanType != ''">#{scanType},</if>
|
||||
<if test="blLastTrack != null and blLastTrack != ''">#{blLastTrack},</if>
|
||||
<if test="preOrNextStation != null and preOrNextStation != ''">#{preOrNextStation},</if>
|
||||
<if test="preOrNextStationCode != null and preOrNextStationCode != ''">#{preOrNextStationCode},</if>
|
||||
<if test="preOrNextStationPhone != null and preOrNextStationPhone != ''">#{preOrNextStationPhone},</if>
|
||||
@ -652,6 +656,7 @@
|
||||
<if test="blSubBill != null and blSubBill != ''">bl_sub_bill = #{blSubBill},</if>
|
||||
<if test="orderSn != null and orderSn != ''">order_sn = #{orderSn},</if>
|
||||
<if test="scanType != null and scanType != ''">scan_type = #{scanType},</if>
|
||||
<if test="blLastTrack != null and blLastTrack != ''">bl_last_track = #{blLastTrack},</if>
|
||||
<if test="preOrNextStation != null and preOrNextStation != ''">pre_or_next_station = #{preOrNextStation},</if>
|
||||
<if test="preOrNextStationCode != null and preOrNextStationCode != ''">pre_or_next_station_code = #{preOrNextStationCode},</if>
|
||||
<if test="preOrNextStationPhone != null and preOrNextStationPhone != ''">pre_or_next_station_phone = #{preOrNextStationPhone},</if>
|
||||
@ -722,4 +727,4 @@
|
||||
</delete>
|
||||
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user