md
This commit is contained in:
parent
b1e41d3ea0
commit
3e953ee256
@ -11,10 +11,14 @@
|
|||||||
|
|
||||||
package com.xdadan.erp.web.emis;
|
package com.xdadan.erp.web.emis;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
|
||||||
|
import com.xdadan.erp.common.utils.DateUtils;
|
||||||
|
import com.xdadan.erp.emis.domain.enumtype.ScanType;
|
||||||
|
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||||
|
import com.xdadan.erp.emis.domain.vo.scan.ScanInfo;
|
||||||
|
import com.xdadan.erp.emis.service.IEmisTmsScanRecordService;
|
||||||
import com.xdadan.erp.emis.utils.WaybillHelper;
|
import com.xdadan.erp.emis.utils.WaybillHelper;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -51,6 +55,9 @@ public class EmisWaybillProblemInfoController extends EmisBaseController
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IEmisWaybillProblemInfoService emisWaybillProblemInfoService;
|
private IEmisWaybillProblemInfoService emisWaybillProblemInfoService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IEmisTmsScanRecordService emisTmsScanRecordService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询问题件列表
|
* 查询问题件列表
|
||||||
*/
|
*/
|
||||||
@ -105,7 +112,54 @@ public class EmisWaybillProblemInfoController extends EmisBaseController
|
|||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody EmisWaybillProblemInfo emisWaybillProblemInfo)
|
public AjaxResult add(@RequestBody EmisWaybillProblemInfo emisWaybillProblemInfo)
|
||||||
{
|
{
|
||||||
return toAjax(emisWaybillProblemInfoService.insertEmisWaybillProblemInfo(emisWaybillProblemInfo));
|
try {
|
||||||
|
|
||||||
|
// 做问题件扫描登记
|
||||||
|
/*
|
||||||
|
|
||||||
|
示例
|
||||||
|
{
|
||||||
|
"scanType": "-1",
|
||||||
|
"opType": "1-检查 2-确认",
|
||||||
|
"scanData": [
|
||||||
|
{
|
||||||
|
"billCode": "T001,T002,T002",
|
||||||
|
"problemType": "问题件类型",
|
||||||
|
"notifySite": "寄件或收件网点编码",
|
||||||
|
"picUrl": "问题件图片",
|
||||||
|
"remark": "问题备注",
|
||||||
|
"scanDate": "2024-05-02 12:03:05",
|
||||||
|
"scanWeight": "0.2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
|
ScanInfo scanInfo = new ScanInfo();
|
||||||
|
List<Map<String,Object>> scanDataList = new ArrayList<>();
|
||||||
|
scanInfo.setOpType(2);
|
||||||
|
scanInfo.setScanType(ScanType.ISSUE.opCode);
|
||||||
|
Map<String,Object> scanDateItem = new HashMap<>();
|
||||||
|
scanDateItem.put("billCode",emisWaybillProblemInfo.getBillCode());
|
||||||
|
scanDateItem.put("problemType",emisWaybillProblemInfo.getProblemType());
|
||||||
|
scanDateItem.put("notifySite",emisWaybillProblemInfo.getSendSiteCode());
|
||||||
|
scanDateItem.put("picUrl",emisWaybillProblemInfo.getFilePath());
|
||||||
|
scanDateItem.put("remark",emisWaybillProblemInfo.getProblemCause());
|
||||||
|
scanDateItem.put("scanDate", DateUtils.parseDateToStr(DateUtils.YYYY_MM_DD_HH_MM_SS,new Date()));
|
||||||
|
scanDateItem.put("scanWeight", "0.0");
|
||||||
|
scanDataList.add(scanDateItem);
|
||||||
|
scanInfo.setScanData(scanDataList);
|
||||||
|
|
||||||
|
emisTmsScanRecordService.scan(scanInfo);
|
||||||
|
return AjaxResult.success("登记成功");
|
||||||
|
} catch (EmisBizError emisBizError) {
|
||||||
|
emisBizError.printStackTrace();
|
||||||
|
return AjaxResult.error(emisBizError.getMessage());
|
||||||
|
}catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error("数据异常!");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -10,10 +10,15 @@
|
|||||||
|
|
||||||
package com.xdadan.erp.emis.service.impl;
|
package com.xdadan.erp.emis.service.impl;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
|
import com.xdadan.erp.common.core.domain.AjaxResult;
|
||||||
|
import com.xdadan.erp.common.utils.DateUtils;
|
||||||
|
import com.xdadan.erp.emis.domain.enumtype.ScanType;
|
||||||
|
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||||
|
import com.xdadan.erp.emis.domain.vo.scan.ScanInfo;
|
||||||
import com.xdadan.erp.emis.service.EmisBaseService;
|
import com.xdadan.erp.emis.service.EmisBaseService;
|
||||||
|
import com.xdadan.erp.emis.service.IEmisTmsScanRecordService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.xdadan.erp.emis.domain.EmisWaybillProblemInfo;
|
import com.xdadan.erp.emis.domain.EmisWaybillProblemInfo;
|
||||||
@ -32,6 +37,10 @@ public class EmisWaybillProblemInfoServiceImpl extends EmisBaseService implement
|
|||||||
@Autowired
|
@Autowired
|
||||||
private EmisWaybillProblemInfoMapper emisWaybillProblemInfoMapper;
|
private EmisWaybillProblemInfoMapper emisWaybillProblemInfoMapper;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询问题件
|
* 查询问题件
|
||||||
*
|
*
|
||||||
@ -66,10 +75,15 @@ public class EmisWaybillProblemInfoServiceImpl extends EmisBaseService implement
|
|||||||
public int insertEmisWaybillProblemInfo(EmisWaybillProblemInfo emisWaybillProblemInfo)
|
public int insertEmisWaybillProblemInfo(EmisWaybillProblemInfo emisWaybillProblemInfo)
|
||||||
{
|
{
|
||||||
// 标记运单问题件
|
// 标记运单问题件
|
||||||
this.changeWaybillProblemInfo(emisWaybillProblemInfo.getBillCode(),emisWaybillProblemInfo.getProblemType(),emisWaybillProblemInfo.getProblemCause());
|
// this.changeWaybillProblemInfo(emisWaybillProblemInfo.getBillCode(),emisWaybillProblemInfo.getProblemType(),emisWaybillProblemInfo.getProblemCause());
|
||||||
emisWaybillProblemInfo.setRegisterSaveDate(new Date());
|
// emisWaybillProblemInfo.setRegisterSaveDate(new Date());
|
||||||
|
// return emisWaybillProblemInfoMapper.insertEmisWaybillProblemInfo(emisWaybillProblemInfo);
|
||||||
|
// 使用问题件扫描接口做登记
|
||||||
|
|
||||||
return emisWaybillProblemInfoMapper.insertEmisWaybillProblemInfo(emisWaybillProblemInfo);
|
|
||||||
|
|
||||||
|
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user