This commit is contained in:
linfso 2024-06-05 16:45:59 +08:00
parent ef4ebecc53
commit 29f20ff7ae
7 changed files with 73 additions and 2 deletions

View File

@ -327,4 +327,17 @@ public class EmisTmsScanRecordController extends EmisBaseController
{
return toAjax(emisTmsScanRecordService.deleteEmisTmsScanRecordByIds(ids));
}
/**
* 删除TMS扫描记录
*/
@PreAuthorize("@ss.hasPermi('emis:emisTmsScanRecord:remove')")
@Log(title = "TMS扫描记录", businessType = BusinessType.DELETE)
@DeleteMapping("/deleteSignedAndRemark")
public AjaxResult deleteSignedAndRemark(Long[] ids,String remark)
{
// 删除备注
return toAjax(emisTmsScanRecordService.deleteEmisTmsScanRecordByIds(ids));
}
}

View File

@ -97,8 +97,12 @@ public interface EmisWaybillMapper extends BaseMapper<EmisWaybill>
public int updatePrintStatus(EmisWaybill emisWaybill);
// 更新为签收
public int updateSignStatus(EmisWaybill emisWaybill);
// 删除签收状态
public int updateUnSignStatus(EmisWaybill emisWaybill);
// 更新问题件状态
public int updateProblemStatus(EmisWaybill emisWaybill);

View File

@ -395,6 +395,22 @@ public class EmisBaseService {
}
/**
* 更新为未签收状态
* @param billCode
*/
public void updateUnSignStatus(String billCode) {
String mainBillCode = billCode;
if(billCode.startsWith("T7080") && billCode.length()>14 ) {
mainBillCode = billCode.substring(0, 14);
}
EmisWaybill waybill = new EmisWaybill();
waybill.setBillCode(mainBillCode);
emisWaybillMapper.updateUnSignStatus(waybill);
}
/**
* 更新问题件状态

View File

@ -104,4 +104,9 @@ public interface IEmisTmsScanRecordService
public List<EmisTmsScanRecord> queryScanStatRecordList(EmisTmsScanRecord emisTmsScanRecord);
// 删除签收记录
public int deleteSignedAndRemark(Long[] ids,String remark);
}

View File

@ -31,8 +31,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.xdadan.erp.emis.mapper.EmisTmsScanRecordMapper;
import com.xdadan.erp.emis.service.IEmisTmsScanRecordService;
import org.springframework.transaction.annotation.Transactional;
/**
/**
* TMS扫描记录Service业务层处理
*
* @author linfso
@ -708,6 +709,23 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
}
@Transactional
@Override
public int deleteSignedAndRemark(Long[] ids,String remark)
{
// 更新运单记录到上一个状态
for (Long id:ids) {
EmisTmsScanRecord record= selectEmisTmsScanRecordById(id);
// 删除运单签收记录
updateUnSignStatus(record.getBillCode());
record.setRemark(remark);
emisTmsScanRecordMapper.updateEmisTmsScanRecord(record);
}
return emisTmsScanRecordMapper.deleteEmisTmsScanRecordByIds(ids);
}

View File

@ -45,7 +45,7 @@
<if test="updateSite != null and updateSite != ''"> and update_site like concat('%', #{updateSite}, '%')</if>
</where>
order by orderNum desc
order by create_time desc
</select>
<select id="checkUnique" parameterType="EmisProblemType" resultType="int">

View File

@ -1056,6 +1056,7 @@
<update id="updateSignStatus" parameterType="EmisWaybill">
update emis_waybill
set sign_man=#{signMan},
bl_sign = '1',
sign_man_code=#{signManCode},
sign_site_code = #{signSiteCode},
sign_date = #{signDate},
@ -1066,6 +1067,20 @@
where bill_code=#{billCode}
</update>
<update id="updateUnSignStatus" parameterType="EmisWaybill">
update emis_waybill
set sign_man=null,
bl_sign = '0',
sign_man_code=null,
sign_site_code = null,
sign_date = null,
bill_pic_dispatch_rmk =null
<if test="updateBy != null and updateBy != ''">,update_by = #{updateBy}</if>
<if test="updateSite != null and updateSite != ''">,update_site = #{updateSite}</if>
where bill_code=#{billCode}
</update>
<update id="updateProblemStatus" parameterType="EmisWaybill">
update emis_waybill
<trim prefix="SET" suffixOverrides=",">