md
This commit is contained in:
parent
6d71078e46
commit
fb9ecef397
@ -81,24 +81,24 @@ public class EmisTmsSiteBatchServiceImpl extends EmisBaseService implements IEmi
|
||||
@Override
|
||||
public int insertEmisTmsSiteBatch(EmisTmsSiteBatch emisTmsSiteBatch)
|
||||
{
|
||||
// 产生批次号
|
||||
String yyMMdd = "yyMMdd";
|
||||
// 站点三字码
|
||||
String siteThreeCode="--";
|
||||
try{
|
||||
|
||||
EmisSite site=getSiteByCode(SecurityUtils.getLoginUser().getUser().getOwnerSiteCode());
|
||||
if(!StringUtils.isEmpty(site.getSizeCode3())) {
|
||||
siteThreeCode = site.getSizeCode3();
|
||||
}
|
||||
}catch (Exception ex){
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
String batchKey= "B"+siteThreeCode+ DateUtils.parseDateToStr(yyMMdd,new Date());
|
||||
Long lockNo = redissonService.addAndGetLong(batchKey,1L);
|
||||
String batchNo =batchKey +StringUtils.leftPad(String.valueOf(lockNo),2,"0");
|
||||
emisTmsSiteBatch.setBatchNo(batchNo);
|
||||
// // 产生批次号
|
||||
// String yyMMdd = "yyMMdd";
|
||||
// // 站点三字码
|
||||
// String siteThreeCode="--";
|
||||
// try{
|
||||
//
|
||||
// EmisSite site=getSiteByCode(SecurityUtils.getLoginUser().getUser().getOwnerSiteCode());
|
||||
// if(!StringUtils.isEmpty(site.getSizeCode3())) {
|
||||
// siteThreeCode = site.getSizeCode3();
|
||||
// }
|
||||
// }catch (Exception ex){
|
||||
// ex.printStackTrace();
|
||||
// }
|
||||
//
|
||||
// String batchKey= "B"+siteThreeCode+ DateUtils.parseDateToStr(yyMMdd,new Date());
|
||||
// Long lockNo = redissonService.addAndGetLong(batchKey,1L);
|
||||
// String batchNo =batchKey +StringUtils.leftPad(String.valueOf(lockNo),2,"0");
|
||||
// emisTmsSiteBatch.setBatchNo(batchNo);
|
||||
|
||||
// 插入明细数据
|
||||
if(!CollectionUtils.isEmpty(emisTmsSiteBatch.getBatchDtlList())){
|
||||
|
||||
Loading…
Reference in New Issue
Block a user