md
This commit is contained in:
parent
782d4d41c5
commit
8633ec8a97
@ -48,7 +48,7 @@ public interface EmisElectronicSitePagMapper extends BaseMapper<EmisElectronicSi
|
||||
* @return
|
||||
*/
|
||||
@Select("select sum(has_bill_count) as has_bill_count from emis_electronic_site_pag where use_site_code='${useSiteCode}' and prefix='${prefix}' and material_code='${materialCode}' and has_bill_count>0 GROUP BY material_code")
|
||||
public int getTotalAvailablePagCount(@Param("useSiteCode")String useSiteCode,@Param("prefix")String prefix,@Param("materialCode") String materialCode);
|
||||
public Integer getTotalAvailablePagCount(@Param("useSiteCode")String useSiteCode,@Param("prefix")String prefix,@Param("materialCode") String materialCode);
|
||||
|
||||
/**
|
||||
* 获取单个面单是否可用
|
||||
@ -65,7 +65,7 @@ public interface EmisElectronicSitePagMapper extends BaseMapper<EmisElectronicSi
|
||||
* @return
|
||||
*/
|
||||
@Update("update emis_electronic_site_pag set cur_start_no='${curStartNo}',has_bill_count=has_bill_count-1 where id=${id} ")
|
||||
public int updateRealMatchWaybill(@Param("curStartNo")String curStartNo,@Param("id")Long id);
|
||||
public Integer updateRealMatchWaybill(@Param("curStartNo")String curStartNo,@Param("id")Long id);
|
||||
|
||||
|
||||
/**
|
||||
@ -75,7 +75,7 @@ public interface EmisElectronicSitePagMapper extends BaseMapper<EmisElectronicSi
|
||||
* @return
|
||||
*/
|
||||
@Update("update emis_electronic_site_pag set has_bill_count=has_bill_count-${useQty} where id=${id} ")
|
||||
public int updateRealMatchSubBill(@Param("useQty") Integer useQty,@Param("id")Long id);
|
||||
public Integer updateRealMatchSubBill(@Param("useQty") Integer useQty,@Param("id")Long id);
|
||||
|
||||
/**
|
||||
* 主键查询
|
||||
@ -99,7 +99,7 @@ public interface EmisElectronicSitePagMapper extends BaseMapper<EmisElectronicSi
|
||||
* @param emisElectronicSitePag
|
||||
* @return 数量
|
||||
*/
|
||||
public int checkUnique(EmisElectronicSitePag emisElectronicSitePag);
|
||||
public Integer checkUnique(EmisElectronicSitePag emisElectronicSitePag);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -49,7 +49,7 @@ public interface IEmisElectronicSitePagService
|
||||
* @param materialCode 1001-主单 1002-子单
|
||||
* @return
|
||||
*/
|
||||
public int getTotalAvailablePagCount(String useSiteCode, String prefix, String materialCode);
|
||||
public Integer getTotalAvailablePagCount(String useSiteCode, String prefix, String materialCode);
|
||||
|
||||
/**
|
||||
* 占用子单号数据
|
||||
|
||||
@ -119,7 +119,7 @@ public class EmisElectronicSitePagServiceImpl extends EmisBaseService implements
|
||||
redissonService.lock(lockKey, 120L);
|
||||
|
||||
// 需要加锁
|
||||
int subBillCount=emisElectronicSitePagMapper.getTotalAvailablePagCount(useSiteCode,prefix,"1002");
|
||||
Integer subBil`lCount=emisElectronicSitePagMapper.getTotalAvailablePagCount(useSiteCode,prefix,"1002");
|
||||
if(subBillCount<=0){
|
||||
redissonService.unlock(lockKey);
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_ENOUGH_PAG,"子单不足");
|
||||
@ -155,7 +155,7 @@ public class EmisElectronicSitePagServiceImpl extends EmisBaseService implements
|
||||
* @param materialCode
|
||||
* @return
|
||||
*/
|
||||
public int getTotalAvailablePagCount(String useSiteCode, String prefix, String materialCode){
|
||||
public Integer getTotalAvailablePagCount(String useSiteCode, String prefix, String materialCode){
|
||||
return emisElectronicSitePagMapper.getTotalAvailablePagCount(useSiteCode,prefix,materialCode);
|
||||
}
|
||||
|
||||
|
||||
@ -1023,7 +1023,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
|
||||
// 子单号做扣减
|
||||
if ("1".equals(emisWaybillSave.getBlGenSubbill())) {
|
||||
int subBillCount = emisElectronicSitePagService.getTotalAvailablePagCount(emisWaybillSave.getSendSiteCode(), "T7080", "1002");
|
||||
Integer subBillCount = emisElectronicSitePagService.getTotalAvailablePagCount(emisWaybillSave.getSendSiteCode(), "T7080", "1002");
|
||||
if (subBillCount <= 0) {
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL, "子单数量不足");
|
||||
}
|
||||
@ -2288,7 +2288,7 @@ public class EmisWaybillServiceImpl extends EmisBaseService implements IEmisWayb
|
||||
|
||||
// 子单号做扣减
|
||||
if ("1".equals(emisWaybillSave.getBlGenSubbill())) {
|
||||
int subBillCount = emisElectronicSitePagService.getTotalAvailablePagCount(emisWaybillSave.getSendSiteCode(), "T7080", "1002");
|
||||
Integer subBillCount = emisElectronicSitePagService.getTotalAvailablePagCount(emisWaybillSave.getSendSiteCode(), "T7080", "1002");
|
||||
if (subBillCount <= 0) {
|
||||
throw new EmisBizError(EmisBizErrorType.FAIL, "子单数量不足");
|
||||
}
|
||||
|
||||
@ -478,12 +478,19 @@ APP Secret:8962fd753b054da88409b18743a6e7c0
|
||||
|
||||
public static void main(String[] args) {
|
||||
|
||||
/*
|
||||
探路供应链(江苏)有限公司 91320104MAD3LBDK4E cf6e11de453f441bbd35691cda6442e3
|
||||
江苏探路者国际物流有限公司 9132010469040698XG 8962fd753b054da88409b18743a6e7c0
|
||||
丝路卡航(江苏)物流服务有限公司 91320104MA258WWMX2 8c01cb064e57476abb95f4a4f37e6d20
|
||||
广西陆陆达国际物流有限公司 91451481MAA7B2672L 763d252d5b8c4dc0b39dddf2425d1fc8
|
||||
|
||||
*/
|
||||
// main2();
|
||||
|
||||
// String token=getToken("9132010469040698XG","8962fd753b054da88409b18743a6e7c0");
|
||||
String token=getToken("91320104MAD3LBDK4E","cf6e11de453f441bbd35691cda6442e3");
|
||||
// JSONObject jRstObj=HXSdk.queryInvoiceResult("TST2024072400-2",token);
|
||||
JSONObject jRstObj=HXSdk.queryInvoiceResult("1819266505825583104",token);
|
||||
JSONObject jRstObj=HXSdk.queryInvoiceResult("1821059286583738368",token);
|
||||
|
||||
// 立即查询状态
|
||||
System.out.println(jRstObj.toJSONString());
|
||||
|
||||
Loading…
Reference in New Issue
Block a user