md
This commit is contained in:
parent
36813d41d2
commit
cbc669c357
@ -81,7 +81,7 @@ public class EmisCommonController extends BaseController
|
||||
@RequestMapping(value = "/getCenterTotalAvailablePag")
|
||||
public AjaxResult getCenterTotalAvailablePag(String prefix)
|
||||
{
|
||||
return AjaxResult.success("获取成功",emisElectronicPagService.getTotalAvailablePag(prefix));
|
||||
return AjaxResult.success("获取成功",emisElectronicPagService.getCenterTotalAvailablePag("T7080"));
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ public interface EmisElectronicPagMapper extends BaseMapper<EmisElectronicPag>
|
||||
* @return
|
||||
*/
|
||||
@Select("select sum(has_bill_count) as has_bill_count from emis_electronic_pag where prefix='${prefix}' and has_bill_count>0 ")
|
||||
public int getTotalAvailablePag(@Param("prefix")String prefix);
|
||||
public int getCenterTotalAvailablePag(@Param("prefix")String prefix);
|
||||
|
||||
|
||||
@Select("select * from emis_electronic_pag where prefix='${prefix}' and has_bill_count>0 order by has_bill_count asc ")
|
||||
|
||||
@ -395,6 +395,9 @@ public class EmisBaseService {
|
||||
String shortLogisticNo4Number=mainBillCode.substring(mainBillCode.length() - 4);
|
||||
// 短号,运单号后6位
|
||||
order.put("shortLogisticNo", shortLogisticNo);
|
||||
|
||||
order.put("totalPrice", "1");
|
||||
|
||||
// 短号,运单号后4位
|
||||
order.put("shortLogisticNo4Number", shortLogisticNo4Number);
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ public interface IEmisElectronicPagService
|
||||
* @param prefix
|
||||
* @return
|
||||
*/
|
||||
public int getTotalAvailablePag(String prefix);
|
||||
public int getCenterTotalAvailablePag(String prefix);
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@ -76,8 +76,8 @@ public class EmisElectronicPagServiceImpl extends EmisBaseService implements IEm
|
||||
* @throws EmisBizError
|
||||
*/
|
||||
@Override
|
||||
public int getTotalAvailablePag(String prefix) {
|
||||
return emisElectronicPagMapper.getTotalAvailablePag(prefix);
|
||||
public int getCenterTotalAvailablePag(String prefix) {
|
||||
return emisElectronicPagMapper.getCenterTotalAvailablePag(prefix);
|
||||
}
|
||||
|
||||
|
||||
@ -336,7 +336,7 @@ public class EmisElectronicPagServiceImpl extends EmisBaseService implements IEm
|
||||
String lockKey="REALMATCHWAYBILL_LOCK";
|
||||
redissonService.lock(lockKey, 120L);
|
||||
// 需要加锁
|
||||
int hasCount=emisElectronicPagMapper.getTotalAvailablePag(prefix);
|
||||
int hasCount=emisElectronicPagMapper.getCenterTotalAvailablePag(prefix);
|
||||
if(hasCount<=0){
|
||||
redissonService.unlock(lockKey);
|
||||
throw new EmisBizError(EmisBizErrorType.NOT_ENOUGH_PAG,"面单不足");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user