md
This commit is contained in:
parent
ef4ebecc53
commit
29f20ff7ae
@ -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));
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 更新问题件状态
|
||||
|
||||
@ -104,4 +104,9 @@ public interface IEmisTmsScanRecordService
|
||||
public List<EmisTmsScanRecord> queryScanStatRecordList(EmisTmsScanRecord emisTmsScanRecord);
|
||||
|
||||
|
||||
|
||||
// 删除签收记录
|
||||
public int deleteSignedAndRemark(Long[] ids,String remark);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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">
|
||||
|
||||
@ -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=",">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user