Merge branch 'develop_migration' into 'develop_master'
feat: There is no way the, tree async See merge request LiuChao/foton-slrs-system-rest!405
This commit is contained in:
+1
@@ -50,6 +50,7 @@ public class SarBussStandMenuController extends BaseController<SarBussStandMenu>
|
||||
SarBussStandMenu menuEO = new SarBussStandMenu();
|
||||
menuEO.setBussStandId(id);
|
||||
menuEO.setMenuId(standardsInfoEO.getMenuId());
|
||||
menuEO.setTreeType(standardsInfoEO.getTreeType());
|
||||
//删除所选目录下关联
|
||||
String oldMenuId = standardsInfoEO.getOldMenuId();
|
||||
if (StringUtils.isEmpty(oldMenuId)) {
|
||||
|
||||
+50
-21
@@ -404,6 +404,13 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
|
||||
public void attrInfoShowExport (List<SarBussionessStand> sarlist) throws Exception {
|
||||
|
||||
//查询字典表,形成Hash映射提升速度
|
||||
List<DicTypeEO> dicInfo = dicTypeEODao.getDicInfo("dic_type_code", "dic_type_name");
|
||||
Map<String, String> dicMap = dicInfo.stream()
|
||||
.filter(item-> !item.getDicTypeCode().isEmpty())
|
||||
.collect(Collectors.toMap(DicTypeEO::getDicTypeCode,DicTypeEO::getDicTypeName,(value1, value2 )->value2));
|
||||
|
||||
for(SarBussionessStand row : sarlist){
|
||||
attrInfoDetailsExport(row);
|
||||
Map<String, Object> getAttrMap = row.getAttrInfoMap();
|
||||
@@ -424,16 +431,17 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
value = String.valueOf(getAttrMap.get("SVPPSName"));
|
||||
entry.setValue(value);
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldListBuss != null && InitStandAttrUtil.fileFieldListBuss.size() > 0 && InitStandAttrUtil.fileFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
if (StringUtils.isNotBlank(value)) {
|
||||
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
entry.setValue(fileObj);
|
||||
}
|
||||
// value = entry.getValue().toString();
|
||||
// if (StringUtils.isNotBlank(value)) {
|
||||
// List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
|
||||
// entry.setValue(fileObj);
|
||||
// }
|
||||
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
|
||||
value = entry.getValue().toString();
|
||||
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
|
||||
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
|
||||
if("ZYQCR".equals(name)||"QTQCR".equals(name)){
|
||||
|
||||
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
|
||||
value = String.valueOf(getAttrMap.get(name + "Name"));
|
||||
}
|
||||
@@ -442,7 +450,21 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
} else {
|
||||
List<String> valArr = Arrays.asList(value.split(","));
|
||||
value = dicTypeEODao.getDicNamesByCodes(valArr);
|
||||
if(entry.getValue()!=null) {
|
||||
StringBuilder builder = new StringBuilder("");
|
||||
for (String s : valArr) {
|
||||
if (dicMap.containsKey(s) && !"ZRBM".equals(name)){
|
||||
builder.append(dicMap.get(s)+" ");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (builder.toString().isEmpty()){
|
||||
value = entry.getValue().toString();
|
||||
}else {
|
||||
value = builder.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
entry.setValue(value);
|
||||
}
|
||||
@@ -889,11 +911,11 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
sarStandMenuEO.setBussStandId(standId);
|
||||
sarStandMenuEO.setId(null);
|
||||
sarStandMenuEO.setValidFlag(0);
|
||||
sarStandMenuEO.setTreeType("sarMs");
|
||||
// 根据当前目录查询所在父节点
|
||||
String secondLevelId = "";
|
||||
List<String> getMenuPIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
|
||||
sarStandMenuEO.setTreeType("sarMs");
|
||||
getMenuPIds = iSarMenuStandardService.getChildMenuList(nowMenuId);
|
||||
}else {
|
||||
getMenuPIds = iTsResourceService.getParentMenuId(nowMenuId);
|
||||
@@ -906,16 +928,18 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
}
|
||||
//查询标准是否已在 当前父节点中
|
||||
SarBussStandMenu standMenuEOQuery = new SarBussStandMenu();
|
||||
standMenuEOQuery.setMenuId(secondLevelId);
|
||||
standMenuEOQuery.setBussStandId(standardsInfoEO.getIdlist()[i]);
|
||||
|
||||
List<String> menuIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
|
||||
// sarMs 技术体系 标准只可选一个 根据标准查询唯一
|
||||
standMenuEOQuery.setTreeType("sarMs");
|
||||
menuIds = iSarMenuStandardService.getChildMenuList(secondLevelId);
|
||||
}else {
|
||||
standMenuEOQuery.setMenuId(secondLevelId);
|
||||
menuIds = iTsResourceService.getChildMenuList(secondLevelId);
|
||||
standMenuEOQuery.setMenuIds(menuIds);
|
||||
}
|
||||
standMenuEOQuery.setMenuIds(menuIds);
|
||||
List<SarBussStandMenu> getInfo = sarBussStandMenuEODao.selectMenuByMenuParentId(standMenuEOQuery);
|
||||
//删除节点与根节点的关联
|
||||
SarBussStandMenu sarStandMenuDel = new SarBussStandMenu();
|
||||
@@ -925,27 +949,32 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
|
||||
int op = 0;
|
||||
if (getInfo == null || getInfo.isEmpty()) {
|
||||
sarStandMenuEO.setId(UUIDUtils.randomUUID20());
|
||||
op = sarBussStandMenuEODao.insert(sarStandMenuEO);
|
||||
op = sarBussStandMenuEODao.insertSelective(sarStandMenuEO);
|
||||
} else {
|
||||
sarStandMenuEO.setOldMenuId(secondLevelId);
|
||||
List<String> menuOldIds = new ArrayList<>();
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
|
||||
menuOldIds = iSarMenuStandardService.getChildMenuList(secondLevelId);
|
||||
sarStandMenuEO.setMenuIds(menuOldIds);
|
||||
sarStandMenuEO.setId(getInfo.get(0).getId());
|
||||
op = sarBussStandMenuEODao.updateById(sarStandMenuEO);
|
||||
}else {
|
||||
menuOldIds= iTsResourceService.getChildMenuList(secondLevelId);
|
||||
sarStandMenuEO.setMenuIds(menuOldIds);
|
||||
op = sarBussStandMenuEODao.updateByStandIdAndMenuId(sarStandMenuEO);
|
||||
}
|
||||
sarStandMenuEO.setMenuIds(menuOldIds);
|
||||
op = sarBussStandMenuEODao.updateByStandIdAndMenuId(sarStandMenuEO);
|
||||
}
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.eq("STAND_ID",standId);
|
||||
List<SarBussStandAttrInfo> infoList = sarBussStandAttrInfoEODao.selectList(qw);
|
||||
if(!infoList.isEmpty()){
|
||||
SarBussStandAttrInfo attrInfo = new SarBussStandAttrInfo();
|
||||
attrInfo.setId(infoList.get(0).getId());
|
||||
attrInfo.setTxlbbuss(menuName);
|
||||
attrInfo.setValidFlag("0");
|
||||
sarBussStandAttrInfoEODao.updateById(attrInfo);
|
||||
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
|
||||
QueryWrapper qw = new QueryWrapper();
|
||||
qw.eq("STAND_ID",standId);
|
||||
List<SarBussStandAttrInfo> infoList = sarBussStandAttrInfoEODao.selectList(qw);
|
||||
if(!infoList.isEmpty()){
|
||||
SarBussStandAttrInfo attrInfo = new SarBussStandAttrInfo();
|
||||
attrInfo.setId(infoList.get(0).getId());
|
||||
attrInfo.setTxlbbuss(menuName);
|
||||
attrInfo.setValidFlag("0");
|
||||
sarBussStandAttrInfoEODao.updateById(attrInfo);
|
||||
}
|
||||
}
|
||||
// sarBussStandMenuEODao.updateByStandIDSelective(sarStandMenuEO);
|
||||
}
|
||||
|
||||
+10
-5
@@ -46,7 +46,7 @@ public class StateSync {
|
||||
|
||||
|
||||
// 月初
|
||||
@Scheduled(cron="0 0 1 1 * ?")
|
||||
// @Scheduled(cron="0 0 1 1 * ?")
|
||||
// @Scheduled(cron="*/5 * * * * ?")
|
||||
@Async
|
||||
public void StandScheduledJobMonthBegin(){
|
||||
@@ -143,8 +143,10 @@ public class StateSync {
|
||||
}
|
||||
}
|
||||
|
||||
// 月初
|
||||
@Scheduled(cron="0 0 1 1 * ?")
|
||||
// 月末
|
||||
@Scheduled(cron="0 0 1 28-31 * ?")
|
||||
// @Scheduled(cron="0 0 1 28-31 * ?")
|
||||
// @Scheduled(cron="*/5 * * * * ?")
|
||||
@Async
|
||||
public void StandScheduledJobMonthEnd(){
|
||||
@@ -154,7 +156,8 @@ public class StateSync {
|
||||
// 判断当前日期是否为月末
|
||||
Date date = new Date();
|
||||
if(isLastDayOfMonth(date)){
|
||||
logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---START-01");
|
||||
logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---START-01");
|
||||
// logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---START-01");
|
||||
String nextFirst = DateUtil.printDate(DateUtil.nextMonthFirstDate());
|
||||
String nextFin = DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate()));
|
||||
String nextFinByQuery = DateUtil.addDay(DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate())),1);
|
||||
@@ -233,9 +236,11 @@ public class StateSync {
|
||||
bussionessStandStateService.updateBatchById(updList);
|
||||
}
|
||||
}
|
||||
logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---End-01");
|
||||
logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---End-01");
|
||||
// logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"---End-01");
|
||||
}else {
|
||||
logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"当前日期不是最后一日---End-01");
|
||||
logger.info("月初:"+Thread.currentThread().getName() + " cron=0 0 1 1 * ? --- " + new Date()+"---End-01");
|
||||
// logger.info("月末:"+Thread.currentThread().getName() + " cron=0 0 1 28-31 * ? --- " + new Date()+"当前日期不是最后一日---End-01");
|
||||
}
|
||||
}catch(Exception e){
|
||||
logger.info(e.getMessage());
|
||||
|
||||
+108
@@ -156,6 +156,114 @@ public class SarBussionessStandEOPage extends BasePage {
|
||||
private String XCSJBUSS;
|
||||
private String BARQ;
|
||||
private String XGD;
|
||||
private String LLCS;
|
||||
private String CS;
|
||||
private String CYCVPPSBMBUSS;
|
||||
private String CYCVPPSCNBUSS;
|
||||
private String KCVPPSBMBUSS;
|
||||
private String KCVPPSCNBUSS;
|
||||
private String DYBXHBUSS;
|
||||
private String DYMCBUSS;
|
||||
private String YYBZ;
|
||||
private String CBCD;
|
||||
private String CYCD;
|
||||
private String CYBZ;
|
||||
|
||||
public String getLLCS() {
|
||||
return LLCS;
|
||||
}
|
||||
|
||||
public void setLLCS(String LLCS) {
|
||||
this.LLCS = LLCS;
|
||||
}
|
||||
|
||||
public String getCS() {
|
||||
return CS;
|
||||
}
|
||||
|
||||
public void setCS(String CS) {
|
||||
this.CS = CS;
|
||||
}
|
||||
|
||||
public String getCYCVPPSBMBUSS() {
|
||||
return CYCVPPSBMBUSS;
|
||||
}
|
||||
|
||||
public void setCYCVPPSBMBUSS(String CYCVPPSBMBUSS) {
|
||||
this.CYCVPPSBMBUSS = CYCVPPSBMBUSS;
|
||||
}
|
||||
|
||||
public String getCYCVPPSCNBUSS() {
|
||||
return CYCVPPSCNBUSS;
|
||||
}
|
||||
|
||||
public void setCYCVPPSCNBUSS(String CYCVPPSCNBUSS) {
|
||||
this.CYCVPPSCNBUSS = CYCVPPSCNBUSS;
|
||||
}
|
||||
|
||||
public String getKCVPPSBMBUSS() {
|
||||
return KCVPPSBMBUSS;
|
||||
}
|
||||
|
||||
public void setKCVPPSBMBUSS(String KCVPPSBMBUSS) {
|
||||
this.KCVPPSBMBUSS = KCVPPSBMBUSS;
|
||||
}
|
||||
|
||||
public String getKCVPPSCNBUSS() {
|
||||
return KCVPPSCNBUSS;
|
||||
}
|
||||
|
||||
public void setKCVPPSCNBUSS(String KCVPPSCNBUSS) {
|
||||
this.KCVPPSCNBUSS = KCVPPSCNBUSS;
|
||||
}
|
||||
|
||||
public String getDYBXHBUSS() {
|
||||
return DYBXHBUSS;
|
||||
}
|
||||
|
||||
public void setDYBXHBUSS(String DYBXHBUSS) {
|
||||
this.DYBXHBUSS = DYBXHBUSS;
|
||||
}
|
||||
|
||||
public String getDYMCBUSS() {
|
||||
return DYMCBUSS;
|
||||
}
|
||||
|
||||
public void setDYMCBUSS(String DYMCBUSS) {
|
||||
this.DYMCBUSS = DYMCBUSS;
|
||||
}
|
||||
|
||||
public String getYYBZ() {
|
||||
return YYBZ;
|
||||
}
|
||||
|
||||
public void setYYBZ(String YYBZ) {
|
||||
this.YYBZ = YYBZ;
|
||||
}
|
||||
|
||||
public String getCBCD() {
|
||||
return CBCD;
|
||||
}
|
||||
|
||||
public void setCBCD(String CBCD) {
|
||||
this.CBCD = CBCD;
|
||||
}
|
||||
|
||||
public String getCYCD() {
|
||||
return CYCD;
|
||||
}
|
||||
|
||||
public void setCYCD(String CYCD) {
|
||||
this.CYCD = CYCD;
|
||||
}
|
||||
|
||||
public String getCYBZ() {
|
||||
return CYBZ;
|
||||
}
|
||||
|
||||
public void setCYBZ(String CYBZ) {
|
||||
this.CYBZ = CYBZ;
|
||||
}
|
||||
|
||||
public String getBARQ() {
|
||||
return BARQ;
|
||||
|
||||
@@ -107,11 +107,13 @@ public class BussStandExportUtil {
|
||||
break;
|
||||
case "标准实施日期":
|
||||
String putTime="";
|
||||
if (Date.class.equals(sarStandardsInfoEO.getPutTime())) {
|
||||
putTime = sdf.format(sarStandardsInfoEO.getPutTime());
|
||||
if(sarStandardsInfoEO.getPutTime() != null){
|
||||
if (Date.class.equals(sarStandardsInfoEO.getPutTime())) {
|
||||
putTime = sdf.format(sarStandardsInfoEO.getPutTime());
|
||||
|
||||
}else {
|
||||
putTime=sarStandardsInfoEO.getPutTime();
|
||||
}else {
|
||||
putTime=sarStandardsInfoEO.getPutTime();
|
||||
}
|
||||
}
|
||||
value = putTime;
|
||||
break;
|
||||
@@ -123,10 +125,12 @@ public class BussStandExportUtil {
|
||||
break;
|
||||
case "发布日期":
|
||||
String issueTime="";
|
||||
if (Date.class.equals(sarStandardsInfoEO.getIssueTime().getClass())){
|
||||
issueTime = sdf.format(sarStandardsInfoEO.getIssueTime());
|
||||
}else {
|
||||
issueTime=sarStandardsInfoEO.getIssueTime();
|
||||
if(sarStandardsInfoEO.getIssueTime() != null){
|
||||
if (Date.class.equals(sarStandardsInfoEO.getIssueTime().getClass())){
|
||||
issueTime = sdf.format(sarStandardsInfoEO.getIssueTime());
|
||||
}else {
|
||||
issueTime=sarStandardsInfoEO.getIssueTime();
|
||||
}
|
||||
}
|
||||
value = issueTime;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user