|
@@ -166,15 +166,25 @@ public class ArchiveTreeContractController extends BladeController {
|
|
|
ar.setArchiveNameSuffix(archiveTreeContract.getArchiveNameSuffix());
|
|
|
}
|
|
|
|
|
|
- if(ar.getArchiveAutoType()==null || ar.getArchiveAutoType()!=2){
|
|
|
- ar.setArchiveAutoType(archiveTreeContract.getArchiveAutoType());
|
|
|
+ ar.setArchiveAutoType(archiveTreeContract.getArchiveAutoType());
|
|
|
+ if(archiveTreeContract.getArchiveAutoType()==2){
|
|
|
+ //客户级的group用19位,在同步的时候方便判断是值是客户级还是项目级
|
|
|
+ double v = Math.random();
|
|
|
+ if (v < 0.1) {
|
|
|
+ v = v + 0.1;
|
|
|
+ }
|
|
|
+ v = v * 1000000;
|
|
|
+ long ran = (long) v;
|
|
|
+ Long contractGroupId = Long.parseLong(System.currentTimeMillis() + "" + ran);
|
|
|
+ archiveTreeContract.setArchiveAutoGroupId(contractGroupId);
|
|
|
+ archiveTreeContract.setArchiveAutoGroupSelect(1);
|
|
|
}
|
|
|
|
|
|
boolean b = archiveTreeContractService.updateById(ar);
|
|
|
//更新下级节点为同一规则
|
|
|
- if(ar.getArchiveAutoType()==null || ar.getArchiveAutoType()!=2){
|
|
|
- archiveTreeContractService.updateAllSonNodeIdsForArchiveAutoRule(ar);
|
|
|
- }
|
|
|
+
|
|
|
+ archiveTreeContractService.updateAllSonNodeIdsForArchiveAutoRule(ar);
|
|
|
+
|
|
|
|
|
|
|
|
|
return R.status(b);
|