md
This commit is contained in:
parent
3ef978b1fe
commit
709ea04046
@ -59,6 +59,15 @@ public interface EmisTmsPackDtlMapper extends BaseMapper<EmisTmsPackDtl>
|
||||
public int checkIsExists(String billCode);
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否存在组包
|
||||
* @param billCode
|
||||
* @return
|
||||
*/
|
||||
public int checkHasPack(String billCode);
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 检查是否存在主单扫描记录
|
||||
* @param mainBillCode
|
||||
@ -66,6 +75,8 @@ public interface EmisTmsPackDtlMapper extends BaseMapper<EmisTmsPackDtl>
|
||||
*/
|
||||
public int checkIsExistsSubBillCode(String mainBillCode);
|
||||
|
||||
public int checkHasPackSubBillCode(String mainBillCode);
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*
|
||||
|
||||
@ -30,6 +30,9 @@ import javax.servlet.http.HttpServletResponse;
|
||||
public interface IEmisWaybillService
|
||||
{
|
||||
|
||||
|
||||
public EmisWaybill selectById(Long id);
|
||||
|
||||
/**
|
||||
* 根据运单查询
|
||||
* @param billCode
|
||||
|
||||
@ -723,7 +723,7 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
}
|
||||
|
||||
// 已组包,不允许再组包
|
||||
int scanCnt=emisTmsPackDtlMapper.checkIsExists(scanBillCode);
|
||||
int scanCnt=emisTmsPackDtlMapper.checkHasPack(scanBillCode);
|
||||
if (scanCnt > 0) {
|
||||
scanResultItem.setResult("fail");
|
||||
scanResultItem.setMessage("[" + scanBillCode + "]已组包");
|
||||
@ -985,7 +985,7 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
}
|
||||
|
||||
// 已组包,不允许再组包
|
||||
int scanCnt=emisTmsPackDtlMapper.checkIsExists(scanBillCode);
|
||||
int scanCnt=emisTmsPackDtlMapper.checkHasPack(scanBillCode);
|
||||
if (scanCnt > 0) {
|
||||
scanResultItem.setResult("fail");
|
||||
scanResultItem.setMessage("[" + scanBillCode + "]已组包");
|
||||
@ -1012,7 +1012,7 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
|
||||
// 如果是主单,判断是否有子单扫描
|
||||
if(scanBillCode.equals(mainBillCode)){
|
||||
int cnt=emisTmsPackDtlMapper.checkIsExistsSubBillCode(mainBillCode);
|
||||
int cnt=emisTmsPackDtlMapper.checkHasPackSubBillCode(mainBillCode);
|
||||
if(cnt>0){
|
||||
scanResultItem.setResult("fail");
|
||||
scanResultItem.setMessage("已有子单扫描,不允许扫描主单");
|
||||
@ -1022,7 +1022,7 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
}
|
||||
}else{
|
||||
//
|
||||
int cnt=emisTmsPackDtlMapper.checkIsExists(mainBillCode);
|
||||
int cnt=emisTmsPackDtlMapper.checkHasPack(mainBillCode);
|
||||
if(cnt>0){
|
||||
scanResultItem.setResult("fail");
|
||||
scanResultItem.setMessage("已有主单扫描,不允许扫描子单");
|
||||
@ -1517,7 +1517,6 @@ public class EmisTmsScanRecordServiceImpl extends EmisBaseService implements IEm
|
||||
// 插入扫描记录
|
||||
addScanRecord(emisTmsScanRecord);
|
||||
|
||||
|
||||
// 更新合包运单扫描状态 ,拆包
|
||||
emisTmsPackDtl.setBillCode(scanBillCode);
|
||||
emisTmsPackDtl.setPackStatus("0");
|
||||
|
||||
@ -113,6 +113,13 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
private ISysFileInfoService sysFileInfoService;
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public EmisWaybill selectById(Long id)
|
||||
{
|
||||
return emisWaybillMapper.selectEmisWaybillById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 直接数据查询运单列表 by billCode
|
||||
*
|
||||
@ -937,6 +944,8 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
if("0".equals(emisWaybillOld.getOrderStatus())){
|
||||
emisWaybillSave.setId(emisWaybillOld.getId());
|
||||
emisWaybillSave.setOrderSn(emisWaybillOld.getOrderSn());
|
||||
// 设定开单时间为当前时间
|
||||
emisWaybillSave.setSendDate(new Date());
|
||||
|
||||
// 开始接单
|
||||
confirmOrder(emisWaybillOld,emisWaybillSave);
|
||||
@ -953,6 +962,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
// 修改运单
|
||||
reUpdateWayBill(emisWaybillOld, emisWaybillSave);
|
||||
|
||||
// 对比历史改单数据
|
||||
|
||||
}
|
||||
}
|
||||
@ -961,6 +971,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 下单接口Oms
|
||||
* @param emisWaybillSave
|
||||
@ -2652,9 +2665,9 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
* @throws EmisBizError
|
||||
*/
|
||||
|
||||
// @DataAuditLog(tableName = "emis_waybill", operateType=OperateType.UPDATE,
|
||||
// serviceclass=EmisWaybillServiceImpl.class
|
||||
// )
|
||||
@DataAuditLog(tableName = "emis_waybill", operateType=OperateType.UPDATE,
|
||||
serviceclass=EmisWaybillServiceImpl.class
|
||||
)
|
||||
@Override
|
||||
public void reUpdateWayBill(EmisWaybill oldEmisWaybill,EmisWaybill emisWaybillSave) throws EmisBizError {
|
||||
|
||||
|
||||
@ -97,14 +97,28 @@
|
||||
|
||||
<select id="checkIsExists" parameterType="EmisTmsPackDtl" resultType="int">
|
||||
select count(1) from emis_tms_pack_dtl
|
||||
where del_flag='0'
|
||||
where del_flag='0' and pack_status='1'
|
||||
and bill_code = #{billCode}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkHasPack" parameterType="EmisTmsPackDtl" resultType="int">
|
||||
select count(1) from emis_tms_pack_dtl
|
||||
where del_flag='0' and pack_status='1'
|
||||
and bill_code = #{billCode}
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkHasPackSubBillCode" parameterType="EmisTmsPackDtl" resultType="int">
|
||||
select count(1) from emis_tms_pack_dtl
|
||||
where del_flag='0' and pack_status='1'
|
||||
and main_bill_code=#{mainBillCode} and main_bill_code!=bill_code
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="checkIsExistsSubBillCode" parameterType="EmisTmsPackDtl" resultType="int">
|
||||
select count(1) from emis_tms_pack_dtl
|
||||
where del_flag='0'
|
||||
where del_flag='0' and pack_status='1'
|
||||
and main_bill_code=#{mainBillCode} and main_bill_code!=bill_code
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
@ -1930,6 +1930,11 @@
|
||||
group by a.waybill_status
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWaybillById" parameterType="Long" resultMap="EmisWaybillResult">
|
||||
<include refid="selectEmisWaybillVo"/>
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<!-- or a.salesmen=#{params.privEmpName}-->
|
||||
<!-- or a.payee=#{params.privEmpName}-->
|
||||
@ -1967,7 +1972,10 @@
|
||||
where a.del_flag='0' and a.bl_bill = '0' and a.order_status !='0' and a.order_status!='2' limit 300
|
||||
</select>
|
||||
|
||||
<select id="selectEmisWaybillById" parameterType="Long" resultMap="EmisWaybillResult">
|
||||
|
||||
|
||||
|
||||
<select id="selectEmisWaybillById_old" parameterType="Long" resultMap="EmisWaybillResult">
|
||||
select id, order_sn, cust_order_id, bill_code, bill_code_sub, order_status, waybill_status, order_type, order_date,
|
||||
user_id, customer_code, customer_name, open_id, receive_name, receive_company, receive_mobile, receive_tel,
|
||||
receive_country, receive_province, receive_city, receive_county, receive_town, receive_address, receive_postcode,
|
||||
@ -1995,6 +2003,8 @@
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<insert id="insertEmisWaybill" parameterType="EmisWaybill" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into emis_waybill
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user