md
This commit is contained in:
parent
b563a316ad
commit
2e4b29aac0
@ -91,6 +91,7 @@ public class EmisWaybillAttachmentController extends BaseController
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody EmisWaybillAttachment emisWaybillAttachment)
|
||||
{
|
||||
// 1-揽收底单
|
||||
return toAjax(emisWaybillAttachmentService.insertEmisWaybillAttachment(emisWaybillAttachment));
|
||||
}
|
||||
|
||||
|
||||
@ -113,6 +113,10 @@ public class EmisTmsScanRecord extends BaseEntity
|
||||
private String dataFrom;
|
||||
/* 图片路径 */
|
||||
private String picUrl;
|
||||
/* 对外公开的信息 */
|
||||
private String publicTraceInfo;
|
||||
/* 内部公开信息 */
|
||||
private String innerTraceInfo;
|
||||
/* 状态 1-启用 0-不启用 */
|
||||
private String status;
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@ public class EmisWaybillAttachment extends BaseEntity
|
||||
private Long waybillId;
|
||||
/* 运单号 */
|
||||
private String billCode;
|
||||
/* 附件类型 1-清关文件 2-揽收底单 3-签收底单 */
|
||||
/* 附件类型 1-揽收底单 2-签收底单 3-清关文件 */
|
||||
private String attachType;
|
||||
/* 文件名称 */
|
||||
private String fileName;
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package com.xdadan.erp.emis.domain.enumtype;
|
||||
|
||||
public enum WaybillAttachType {
|
||||
|
||||
GOT_PIC("1","揽收底单"),
|
||||
SIGNED_PIC("2","签收底单"),
|
||||
DECLEAR_PIC("3","报关文件"),
|
||||
CLEAR_PIC("4","清关文件")
|
||||
;
|
||||
|
||||
public String typeCode;
|
||||
public String typeName;
|
||||
|
||||
WaybillAttachType(String typeCode, String typeName) {
|
||||
this.typeCode = typeCode;
|
||||
this.typeName = typeName;
|
||||
}
|
||||
}
|
||||
@ -24,6 +24,7 @@ public class ScanInfo implements Serializable {
|
||||
|
||||
private String scanType;
|
||||
private Integer opType;
|
||||
private String dataFrom;
|
||||
|
||||
private List<Map<String,Object>> scanData;
|
||||
|
||||
|
||||
@ -262,8 +262,7 @@ public class EmisBaseService {
|
||||
}
|
||||
// 问题件
|
||||
else if(ScanType.ISSUE.opCode.equals(scanType)){
|
||||
|
||||
content=" 问题件:";
|
||||
content="问题件";
|
||||
}
|
||||
// 合包
|
||||
else if(ScanType.CO_PACKING.opCode.equals(scanType)){
|
||||
|
||||
@ -17,6 +17,7 @@ import com.xdadan.erp.common.core.domain.entity.SysUser;
|
||||
import com.xdadan.erp.common.utils.DateUtils;
|
||||
import com.xdadan.erp.emis.domain.*;
|
||||
import com.xdadan.erp.emis.domain.enumtype.ScanType;
|
||||
import com.xdadan.erp.emis.domain.enumtype.WaybillAttachType;
|
||||
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||
import com.xdadan.erp.emis.domain.stat.ScanStatDataInfo;
|
||||
import com.xdadan.erp.emis.domain.vo.scan.ScanInfo;
|
||||
@ -223,7 +224,7 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
* @param scanDataItem
|
||||
* @return
|
||||
*/
|
||||
public List<ScanResultItem> doScan(String scanType,Map<String,Object> scanDataItem){
|
||||
public List<ScanResultItem> doScan(String scanType,Map<String,Object> scanDataItem,String dataFrom){
|
||||
|
||||
List<ScanResultItem> itemList = new ArrayList<>();
|
||||
String billCodeInStr = (String)scanDataItem.get("billCode");
|
||||
@ -414,11 +415,21 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
|
||||
emisTmsScanRecord.setRemark(remark);
|
||||
|
||||
// 运单附件签收图片信息
|
||||
EmisWaybillAttachment emisWaybillAttachment = new EmisWaybillAttachment();
|
||||
emisWaybillAttachment.setBillCode(emisTmsScanRecord.getBillCode());
|
||||
emisWaybillAttachment.setAttachType(WaybillAttachType.SIGNED_PIC.typeCode); // 签收图片
|
||||
emisWaybillAttachment.setFileSiez(0);
|
||||
emisWaybillAttachment.setFileDesc("签收图片");
|
||||
emisWaybillAttachment.setFileUrl(picUrl);
|
||||
emisWaybillAttachment.setDataFrom(emisTmsScanRecord.getDataFrom());
|
||||
emisWaybillAttachmentMapper.insertEmisWaybillAttachment(emisWaybillAttachment);
|
||||
|
||||
EmisTmsScanPicInfo emisTmsScanPicInfo = new EmisTmsScanPicInfo();
|
||||
emisTmsScanPicInfo.setBillCode(emisTmsScanRecord.getBillCode());
|
||||
emisTmsScanPicInfo.setPicType(scanType);
|
||||
emisTmsScanPicInfo.setPicUrl(picUrl);
|
||||
emisTmsScanPicInfo.preInsert();
|
||||
|
||||
emisTmsScanPicInfoMapper.insertEmisTmsScanPicInfo(emisTmsScanPicInfo);
|
||||
|
||||
// 更新总运单签收记录
|
||||
@ -483,7 +494,7 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
// "scanDate": "2024-05-02 12:03:05",
|
||||
// "scanWeight": "0.2"
|
||||
|
||||
String problemType = (String)scanDataItem.get("problemType");
|
||||
String problemType = String.valueOf(scanDataItem.get("problemType"));
|
||||
String notifySite = (String)scanDataItem.get("notifySite");
|
||||
String picUrl = (String)scanDataItem.get("picUrl");
|
||||
String remark = (String)scanDataItem.get("remark");
|
||||
@ -633,7 +644,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);
|
||||
List<ScanResultItem> itemCheckList=doScan(scanInfo.getScanType(),item,scanInfo.getDataFrom());
|
||||
resultList.addAll(itemCheckList);
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,6 +43,8 @@
|
||||
<result property="truckCode" column="truck_code" />
|
||||
<result property="dataFrom" column="data_from" />
|
||||
<result property="picUrl" column="pic_url" />
|
||||
<result property="publicTraceInfo" column="public_trace_info" />
|
||||
<result property="innerTraceInfo" column="inner_trace_info" />
|
||||
<result property="status" column="status" />
|
||||
|
||||
|
||||
@ -149,12 +151,7 @@
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 获取物流轨迹 -->
|
||||
<select id="selectTraceListByBillCode" parameterType="string" resultMap="EmisTmsScanRecordResult">
|
||||
<include refid="selectEmisTmsScanRecordVo"/>
|
||||
where del_flag='0' and del_flag='0' and bill_code=#{billCode}
|
||||
order by create_time desc;
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 获取订单最后一条扫描记录 -->
|
||||
<select id="selectLastRecordByBillCode" parameterType="string" resultMap="EmisTmsScanRecordResult">
|
||||
@ -173,11 +170,16 @@
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<!-- 获取物流轨迹 -->
|
||||
<select id="selectTraceListByBillCode" parameterType="string" resultMap="EmisTmsScanRecordResult">
|
||||
<include refid="selectEmisTmsScanRecordVo"/>
|
||||
where del_flag='0' and del_flag='0' and bill_code=#{billCode}
|
||||
order by create_time desc;
|
||||
</select>
|
||||
|
||||
|
||||
<sql id="selectEmisTmsScanRecordVo">
|
||||
select id, bill_code, 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, 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, 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, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site from emis_tms_scan_record
|
||||
</sql>
|
||||
|
||||
|
||||
@ -280,12 +282,12 @@
|
||||
<!-- and params.queryType = 2-->
|
||||
|
||||
<select id="selectEmisTmsScanRecordById" parameterType="Long" resultMap="EmisTmsScanRecordResult">
|
||||
select id, bill_code, 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, status, del_flag, create_by, create_time, update_by, update_time, remark, update_site, create_site
|
||||
select id, bill_code, 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, 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>
|
||||
|
||||
<insert id="insertEmisTmsScanRecord" parameterType="EmisTmsScanRecord">
|
||||
<insert id="insertEmisTmsScanRecord" parameterType="EmisTmsScanRecord" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_tms_scan_record
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">id,</if>
|
||||
@ -326,6 +328,8 @@
|
||||
<if test="truckCode != null and truckCode != ''">truck_code,</if>
|
||||
<if test="dataFrom != null and dataFrom != ''">data_from,</if>
|
||||
<if test="picUrl != null and picUrl != ''">pic_url,</if>
|
||||
<if test="publicTraceInfo != null and publicTraceInfo != ''">public_trace_info,</if>
|
||||
<if test="innerTraceInfo != null and innerTraceInfo != ''">inner_trace_info,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
@ -375,6 +379,8 @@
|
||||
<if test="truckCode != null and truckCode != ''">#{truckCode},</if>
|
||||
<if test="dataFrom != null and dataFrom != ''">#{dataFrom},</if>
|
||||
<if test="picUrl != null and picUrl != ''">#{picUrl},</if>
|
||||
<if test="publicTraceInfo != null and publicTraceInfo != ''">#{publicTraceInfo},</if>
|
||||
<if test="innerTraceInfo != null and innerTraceInfo != ''">#{innerTraceInfo},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="delFlag != null and delFlag != ''">#{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
@ -390,8 +396,8 @@
|
||||
<update id="updateEmisTmsScanRecord" parameterType="EmisTmsScanRecord">
|
||||
update emis_tms_scan_record
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="billCode != null and billCode != '' ">bill_code = #{billCode},</if>
|
||||
<if test="orderSn != null and orderSn != '' ">order_sn = #{orderSn},</if>
|
||||
<if test="billCode != null and billCode != ''">bill_code = #{billCode},</if>
|
||||
<if test="orderSn != null and orderSn != ''">order_sn = #{orderSn},</if>
|
||||
<if test="scanType != null and scanType != ''">scan_type = #{scanType},</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>
|
||||
@ -427,6 +433,8 @@
|
||||
<if test="truckCode != null and truckCode != ''">truck_code = #{truckCode},</if>
|
||||
<if test="dataFrom != null and dataFrom != ''">data_from = #{dataFrom},</if>
|
||||
<if test="picUrl != null and picUrl != ''">pic_url = #{picUrl},</if>
|
||||
<if test="publicTraceInfo != null and publicTraceInfo != ''">public_trace_info = #{publicTraceInfo},</if>
|
||||
<if test="innerTraceInfo != null and innerTraceInfo != ''">inner_trace_info = #{innerTraceInfo},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
||||
@ -436,7 +444,6 @@
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="updateSite != null and updateSite != ''">update_site = #{updateSite},</if>
|
||||
<if test="createSite != null and createSite != ''">create_site = #{createSite},</if>
|
||||
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user