md
This commit is contained in:
parent
a44ad066a7
commit
6b590dd07c
@ -254,6 +254,10 @@ public class EmisWaybillTransferController extends EmisBaseController
|
|||||||
@DeleteMapping("/{ids}")
|
@DeleteMapping("/{ids}")
|
||||||
public AjaxResult remove(@PathVariable Long[] ids)
|
public AjaxResult remove(@PathVariable Long[] ids)
|
||||||
{
|
{
|
||||||
return toAjax(emisWaybillTransferService.deleteEmisWaybillTransferByIds(ids));
|
if(ids!=null&&ids.length>0) {
|
||||||
|
return toAjax(emisWaybillTransferService.deleteEmisWaybillTransferByIds(ids));
|
||||||
|
}else{
|
||||||
|
return AjaxResult.error("请选择记录");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -158,6 +158,9 @@ public interface EmisWaybillMapper extends BaseMapper<EmisWaybill>
|
|||||||
// 转件登记
|
// 转件登记
|
||||||
public int updateTransferInfo(EmisWaybill emisWaybill);
|
public int updateTransferInfo(EmisWaybill emisWaybill);
|
||||||
|
|
||||||
|
public int cancelTransferInfo(EmisWaybill emisWaybill);
|
||||||
|
|
||||||
|
|
||||||
// 检查子单是否存在
|
// 检查子单是否存在
|
||||||
public int checkDbSubBillIsExists(@Param("billCode")String billCode,@Param("subNum") Integer subNum);
|
public int checkDbSubBillIsExists(@Param("billCode")String billCode,@Param("subNum") Integer subNum);
|
||||||
|
|
||||||
|
|||||||
@ -821,6 +821,7 @@ public class EmisBaseService {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取三方物流轨迹
|
* 获取三方物流轨迹
|
||||||
* @param billCode
|
* @param billCode
|
||||||
|
|||||||
@ -11,8 +11,9 @@ package com.xdadan.erp.emis.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.xdadan.erp.emis.domain.EmisWaybillTransfer;
|
import com.xdadan.erp.emis.domain.EmisWaybillTransfer;
|
||||||
|
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @ClassName EmisWaybillTransferService
|
* @ClassName EmisWaybillTransferService
|
||||||
* @Description 运单转件表
|
* @Description 运单转件表
|
||||||
* @author linfso
|
* @author linfso
|
||||||
@ -65,5 +66,5 @@ public interface IEmisWaybillTransferService
|
|||||||
* @param id 运单转件表主键
|
* @param id 运单转件表主键
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
public int deleteEmisWaybillTransferById(Long id);
|
public int deleteEmisWaybillTransferById(Long id) throws EmisBizError;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,11 @@ package com.xdadan.erp.emis.service.impl;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.xdadan.erp.emis.domain.EmisWaybill;
|
||||||
|
import com.xdadan.erp.emis.domain.enumtype.EmisBizErrorType;
|
||||||
|
import com.xdadan.erp.emis.domain.exception.EmisBizError;
|
||||||
|
import com.xdadan.erp.emis.mapper.EmisTmsTransferTraceMapper;
|
||||||
|
import com.xdadan.erp.emis.mapper.EmisWaybillMapper;
|
||||||
import com.xdadan.erp.emis.service.IEmisTmsScanRecordService;
|
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;
|
||||||
@ -32,6 +37,11 @@ public class EmisWaybillTransferServiceImpl implements IEmisWaybillTransferServ
|
|||||||
private EmisWaybillTransferMapper emisWaybillTransferMapper;
|
private EmisWaybillTransferMapper emisWaybillTransferMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
protected EmisWaybillMapper emisWaybillMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EmisTmsTransferTraceMapper emisTmsTransferTraceMapper;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询运单转件表
|
* 查询运单转件表
|
||||||
@ -90,10 +100,18 @@ public class EmisWaybillTransferServiceImpl implements IEmisWaybillTransferServ
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteEmisWaybillTransferByIds(Long[] ids)
|
public int deleteEmisWaybillTransferByIds(Long[] ids) {
|
||||||
{
|
if(ids!=null&& ids.length>0) {
|
||||||
|
for (int i=0;i<ids.length;i++){
|
||||||
return emisWaybillTransferMapper.deleteEmisWaybillTransferByIds(ids);
|
Long id=ids[i];
|
||||||
|
try {
|
||||||
|
this.deleteEmisWaybillTransferById(id);
|
||||||
|
} catch (Exception ex) {
|
||||||
|
ex.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -103,8 +121,22 @@ public class EmisWaybillTransferServiceImpl implements IEmisWaybillTransferServ
|
|||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public int deleteEmisWaybillTransferById(Long id)
|
public int deleteEmisWaybillTransferById(Long id) throws EmisBizError {
|
||||||
{
|
EmisWaybillTransfer emisWaybillTransfer=emisWaybillTransferMapper.selectEmisWaybillTransferById(id);
|
||||||
|
if(emisWaybillTransfer==null){
|
||||||
|
throw new EmisBizError(EmisBizErrorType.FAIL,"转件不存在");
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除转件记录
|
||||||
|
// 清除运单转单记录
|
||||||
|
EmisWaybill upd=new EmisWaybill();
|
||||||
|
upd.setBillCode(emisWaybillTransfer.getBillCode());
|
||||||
|
emisWaybillMapper.cancelTransferInfo(upd);
|
||||||
|
|
||||||
|
// 删除转件轨迹抓取记录
|
||||||
|
emisTmsTransferTraceMapper.deleteEmisTmsTransferTraceByBillCode(emisWaybillTransfer.getBillCode());
|
||||||
|
|
||||||
|
|
||||||
return emisWaybillTransferMapper.deleteEmisWaybillTransferById(id);
|
return emisWaybillTransferMapper.deleteEmisWaybillTransferById(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -2437,6 +2437,21 @@
|
|||||||
where bill_code=#{billCode}
|
where bill_code=#{billCode}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
|
||||||
|
<update id="cancelTransferInfo" parameterType="EmisWaybill">
|
||||||
|
update emis_waybill
|
||||||
|
<trim prefix="SET" suffixOverrides=",">
|
||||||
|
bl_disp_fd ='0',
|
||||||
|
transfer_code = null,
|
||||||
|
transfer_billcode = null,
|
||||||
|
disp_fd_date =null,
|
||||||
|
disp_fd_reason =null
|
||||||
|
<if test="updateBy != null and updateBy != ''">,update_by = #{updateBy}</if>
|
||||||
|
<if test="updateSite != null and updateSite != ''">,update_site = #{updateSite}</if>
|
||||||
|
</trim>
|
||||||
|
where bill_code=#{billCode}
|
||||||
|
</update>
|
||||||
|
|
||||||
<update id="updatePreOrNextSiteByBillCode" parameterType="EmisWaybill">
|
<update id="updatePreOrNextSiteByBillCode" parameterType="EmisWaybill">
|
||||||
|
|
||||||
update emis_waybill
|
update emis_waybill
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user