从源更新
This commit is contained in:
@@ -136,22 +136,7 @@ public class DepotItemController {
|
|||||||
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
return returnJson(objectMap, ErpInfo.OK.name, ErpInfo.OK.code);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 仅根据商品Id进行数量合计
|
|
||||||
*
|
|
||||||
* @param type
|
|
||||||
* @param mId
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public int sumNumberByMaterialId(String type, Long mId)throws Exception {
|
|
||||||
int allNumber = 0;
|
|
||||||
try {
|
|
||||||
allNumber = depotItemService.findByTypeAndMaterialId(type, mId);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
return allNumber;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -27,7 +27,6 @@ import java.lang.annotation.*;
|
|||||||
* serialNumber-105
|
* serialNumber-105
|
||||||
* organization-110
|
* organization-110
|
||||||
* orgaUserRel-115
|
* orgaUserRel-115
|
||||||
* tenant-120
|
|
||||||
*/
|
*/
|
||||||
@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
|
@Target({ElementType.TYPE, ElementType.ANNOTATION_TYPE})
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
@Retention(RetentionPolicy.RUNTIME)
|
||||||
|
|||||||
@@ -264,12 +264,10 @@ public class DepotHeadService {
|
|||||||
/**
|
/**
|
||||||
* 创建一个唯一的序列号
|
* 创建一个唯一的序列号
|
||||||
* */
|
* */
|
||||||
@Transactional(value = "transactionManager", rollbackFor = Exception.class)
|
public String buildOnlyNumber()throws Exception{
|
||||||
public String buildOnlyNumber()throws Exception{
|
|
||||||
Long buildOnlyNumber=null;
|
Long buildOnlyNumber=null;
|
||||||
synchronized (this){
|
synchronized (this){
|
||||||
try{
|
try{
|
||||||
depotHeadMapperEx.updateBuildOnlyNumber(); //编号+1
|
|
||||||
buildOnlyNumber= depotHeadMapperEx.getBuildOnlyNumber(BusinessConstants.DEPOT_NUMBER_SEQ);
|
buildOnlyNumber= depotHeadMapperEx.getBuildOnlyNumber(BusinessConstants.DEPOT_NUMBER_SEQ);
|
||||||
}catch(Exception e){
|
}catch(Exception e){
|
||||||
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
logger.error("异常码[{}],异常提示[{}],异常[{}]",
|
||||||
@@ -277,6 +275,7 @@ public class DepotHeadService {
|
|||||||
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
|
throw new BusinessRunTimeException(ExceptionConstants.DATA_WRITE_FAIL_CODE,
|
||||||
ExceptionConstants.DATA_WRITE_FAIL_MSG);
|
ExceptionConstants.DATA_WRITE_FAIL_MSG);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if(buildOnlyNumber<BusinessConstants.SEQ_TO_STRING_MIN_LENGTH){
|
if(buildOnlyNumber<BusinessConstants.SEQ_TO_STRING_MIN_LENGTH){
|
||||||
StringBuffer sb=new StringBuffer(buildOnlyNumber.toString());
|
StringBuffer sb=new StringBuffer(buildOnlyNumber.toString());
|
||||||
|
|||||||
Reference in New Issue
Block a user