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:
super_liu
2022-02-22 17:21:21 +08:00
9 changed files with 199 additions and 45 deletions
@@ -38,8 +38,8 @@ public class ActSarItemsBussEOController extends BaseController<ActSarItemsEO> {
@PostMapping("/processCreateBuss") @PostMapping("/processCreateBuss")
public ResponseMessage processCreateBuss(String infoJson) throws Exception { public ResponseMessage processCreateBuss(String infoJson) throws Exception {
if (StringUtils.isNotBlank(infoJson)) { if (StringUtils.isNotBlank(infoJson)) {
actSarItemsEOService.processCreateBuss(infoJson); String bussId = actSarItemsEOService.processCreateBuss(infoJson);
return Result.success("入库成功"); return Result.success(bussId);
} else { } else {
return Result.error("传入数据json不能为空"); return Result.error("传入数据json不能为空");
} }
@@ -217,9 +217,10 @@ public class ActSarItemsBussEOService {
* @Param: [standJson] * @Param: [standJson]
* @Return: void * @Return: void
*/ */
public void processCreateBuss(String standJson) throws Exception{ public String processCreateBuss(String standJson) throws Exception{
Map<String,Object> standMap = new HashMap(); Map<String,Object> standMap = new HashMap();
standMap = JSONObject.parseObject(standJson); standMap = JSONObject.parseObject(standJson);
String bussId = "";
if (standMap != null && !standMap.isEmpty()) { if (standMap != null && !standMap.isEmpty()) {
String prcNum = String.valueOf(standMap.get("prcNum")); String prcNum = String.valueOf(standMap.get("prcNum"));
String pid = String.valueOf(standMap.get("topId")); String pid = String.valueOf(standMap.get("topId"));
@@ -286,7 +287,6 @@ public class ActSarItemsBussEOService {
// sarStandardsInfoEO.setMenuId("22179d54d4e640098e29"); // sarStandardsInfoEO.setMenuId("22179d54d4e640098e29");
// } // }
//此处判断是否是带入的标准 //此处判断是否是带入的标准
String bussId = "";
if(StringUtils.isNotBlank(sarBussionessStand.getId())) { if(StringUtils.isNotBlank(sarBussionessStand.getId())) {
bussId = sarBussionessStand.getId(); bussId = sarBussionessStand.getId();
SarBussionessStand query = new SarBussionessStand(); SarBussionessStand query = new SarBussionessStand();
@@ -413,7 +413,7 @@ public class ActSarItemsBussEOService {
} }
} }
return bussId;
} }
private void updateStandFileFieldData(Map<String,Object> addAttInfoMap,Map<String,Object> oldAttInfoMap){ private void updateStandFileFieldData(Map<String,Object> addAttInfoMap,Map<String,Object> oldAttInfoMap){
@@ -50,6 +50,7 @@ public class SarBussStandMenuController extends BaseController<SarBussStandMenu>
SarBussStandMenu menuEO = new SarBussStandMenu(); SarBussStandMenu menuEO = new SarBussStandMenu();
menuEO.setBussStandId(id); menuEO.setBussStandId(id);
menuEO.setMenuId(standardsInfoEO.getMenuId()); menuEO.setMenuId(standardsInfoEO.getMenuId());
menuEO.setTreeType(standardsInfoEO.getTreeType());
//删除所选目录下关联 //删除所选目录下关联
String oldMenuId = standardsInfoEO.getOldMenuId(); String oldMenuId = standardsInfoEO.getOldMenuId();
if (StringUtils.isEmpty(oldMenuId)) { if (StringUtils.isEmpty(oldMenuId)) {
@@ -404,6 +404,13 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
} }
public void attrInfoShowExport (List<SarBussionessStand> sarlist) throws Exception { 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){ for(SarBussionessStand row : sarlist){
attrInfoDetailsExport(row); attrInfoDetailsExport(row);
Map<String, Object> getAttrMap = row.getAttrInfoMap(); Map<String, Object> getAttrMap = row.getAttrInfoMap();
@@ -424,16 +431,17 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
value = String.valueOf(getAttrMap.get("SVPPSName")); value = String.valueOf(getAttrMap.get("SVPPSName"));
entry.setValue(value); entry.setValue(value);
} else if (entry.getValue() != null && InitStandAttrUtil.fileFieldListBuss != null && InitStandAttrUtil.fileFieldListBuss.size() > 0 && InitStandAttrUtil.fileFieldListBuss.contains(name)) { } else if (entry.getValue() != null && InitStandAttrUtil.fileFieldListBuss != null && InitStandAttrUtil.fileFieldListBuss.size() > 0 && InitStandAttrUtil.fileFieldListBuss.contains(name)) {
value = entry.getValue().toString(); // value = entry.getValue().toString();
if (StringUtils.isNotBlank(value)) { // if (StringUtils.isNotBlank(value)) {
List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value); // List<AttFileEO> fileObj = attFileEOService.getMultiFileInfos(value);
entry.setValue(fileObj); // entry.setValue(fileObj);
} // }
} else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) { } else if (entry.getValue() != null && InitStandAttrUtil.selectionFieldListBuss != null && InitStandAttrUtil.selectionFieldListBuss.size() > 0 && InitStandAttrUtil.selectionFieldListBuss.contains(name)) {
value = entry.getValue().toString(); value = entry.getValue().toString();
String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name); String selVal = InitStandAttrUtil.selectFieldMapBuss.get(name);
if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) { if (SelectionTypeEnum.ORGLIST.getValue().equals(selVal) || SelectionTypeEnum.USERLIST.getValue().equals(selVal) || SelectionTypeEnum.ROLELIST.getValue().equals(selVal)) {
if("ZYQCR".equals(name)||"QTQCR".equals(name)){ if("ZYQCR".equals(name)||"QTQCR".equals(name)){
if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){ if(getAttrMap.get(name + "Name")!=null && !getAttrMap.get(name + "Name").equals("")){
value = String.valueOf(getAttrMap.get(name + "Name")); value = String.valueOf(getAttrMap.get(name + "Name"));
} }
@@ -442,7 +450,21 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
} }
} else { } else {
List<String> valArr = Arrays.asList(value.split(",")); 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); entry.setValue(value);
} }
@@ -889,11 +911,11 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
sarStandMenuEO.setBussStandId(standId); sarStandMenuEO.setBussStandId(standId);
sarStandMenuEO.setId(null); sarStandMenuEO.setId(null);
sarStandMenuEO.setValidFlag(0); sarStandMenuEO.setValidFlag(0);
sarStandMenuEO.setTreeType("sarMs");
// 根据当前目录查询所在父节点 // 根据当前目录查询所在父节点
String secondLevelId = ""; String secondLevelId = "";
List<String> getMenuPIds = new ArrayList<>(); List<String> getMenuPIds = new ArrayList<>();
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){ if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)){
sarStandMenuEO.setTreeType("sarMs");
getMenuPIds = iSarMenuStandardService.getChildMenuList(nowMenuId); getMenuPIds = iSarMenuStandardService.getChildMenuList(nowMenuId);
}else { }else {
getMenuPIds = iTsResourceService.getParentMenuId(nowMenuId); getMenuPIds = iTsResourceService.getParentMenuId(nowMenuId);
@@ -906,16 +928,18 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
} }
//查询标准是否已在 当前父节点中 //查询标准是否已在 当前父节点中
SarBussStandMenu standMenuEOQuery = new SarBussStandMenu(); SarBussStandMenu standMenuEOQuery = new SarBussStandMenu();
standMenuEOQuery.setMenuId(secondLevelId);
standMenuEOQuery.setBussStandId(standardsInfoEO.getIdlist()[i]); standMenuEOQuery.setBussStandId(standardsInfoEO.getIdlist()[i]);
List<String> menuIds = new ArrayList<>(); List<String> menuIds = new ArrayList<>();
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) { if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
// sarMs 技术体系 标准只可选一个 根据标准查询唯一
standMenuEOQuery.setTreeType("sarMs");
menuIds = iSarMenuStandardService.getChildMenuList(secondLevelId); menuIds = iSarMenuStandardService.getChildMenuList(secondLevelId);
}else { }else {
standMenuEOQuery.setMenuId(secondLevelId);
menuIds = iTsResourceService.getChildMenuList(secondLevelId); menuIds = iTsResourceService.getChildMenuList(secondLevelId);
standMenuEOQuery.setMenuIds(menuIds);
} }
standMenuEOQuery.setMenuIds(menuIds);
List<SarBussStandMenu> getInfo = sarBussStandMenuEODao.selectMenuByMenuParentId(standMenuEOQuery); List<SarBussStandMenu> getInfo = sarBussStandMenuEODao.selectMenuByMenuParentId(standMenuEOQuery);
//删除节点与根节点的关联 //删除节点与根节点的关联
SarBussStandMenu sarStandMenuDel = new SarBussStandMenu(); SarBussStandMenu sarStandMenuDel = new SarBussStandMenu();
@@ -925,27 +949,32 @@ public class SarBussionessStandServiceImpl extends ServiceImpl<SarBussionessStan
int op = 0; int op = 0;
if (getInfo == null || getInfo.isEmpty()) { if (getInfo == null || getInfo.isEmpty()) {
sarStandMenuEO.setId(UUIDUtils.randomUUID20()); sarStandMenuEO.setId(UUIDUtils.randomUUID20());
op = sarBussStandMenuEODao.insert(sarStandMenuEO); op = sarBussStandMenuEODao.insertSelective(sarStandMenuEO);
} else { } else {
sarStandMenuEO.setOldMenuId(secondLevelId); sarStandMenuEO.setOldMenuId(secondLevelId);
List<String> menuOldIds = new ArrayList<>(); List<String> menuOldIds = new ArrayList<>();
if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) { if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
menuOldIds = iSarMenuStandardService.getChildMenuList(secondLevelId); menuOldIds = iSarMenuStandardService.getChildMenuList(secondLevelId);
sarStandMenuEO.setMenuIds(menuOldIds);
sarStandMenuEO.setId(getInfo.get(0).getId());
op = sarBussStandMenuEODao.updateById(sarStandMenuEO);
}else { }else {
menuOldIds= iTsResourceService.getChildMenuList(secondLevelId); menuOldIds= iTsResourceService.getChildMenuList(secondLevelId);
sarStandMenuEO.setMenuIds(menuOldIds);
op = sarBussStandMenuEODao.updateByStandIdAndMenuId(sarStandMenuEO);
} }
sarStandMenuEO.setMenuIds(menuOldIds);
op = sarBussStandMenuEODao.updateByStandIdAndMenuId(sarStandMenuEO);
} }
QueryWrapper qw = new QueryWrapper(); if(StringUtils.isNotBlank(treeType) && "sarMs".equals(treeType)) {
qw.eq("STAND_ID",standId); QueryWrapper qw = new QueryWrapper();
List<SarBussStandAttrInfo> infoList = sarBussStandAttrInfoEODao.selectList(qw); qw.eq("STAND_ID",standId);
if(!infoList.isEmpty()){ List<SarBussStandAttrInfo> infoList = sarBussStandAttrInfoEODao.selectList(qw);
SarBussStandAttrInfo attrInfo = new SarBussStandAttrInfo(); if(!infoList.isEmpty()){
attrInfo.setId(infoList.get(0).getId()); SarBussStandAttrInfo attrInfo = new SarBussStandAttrInfo();
attrInfo.setTxlbbuss(menuName); attrInfo.setId(infoList.get(0).getId());
attrInfo.setValidFlag("0"); attrInfo.setTxlbbuss(menuName);
sarBussStandAttrInfoEODao.updateById(attrInfo); attrInfo.setValidFlag("0");
sarBussStandAttrInfoEODao.updateById(attrInfo);
}
} }
// sarBussStandMenuEODao.updateByStandIDSelective(sarStandMenuEO); // sarBussStandMenuEODao.updateByStandIDSelective(sarStandMenuEO);
} }
@@ -46,7 +46,7 @@ public class StateSync {
// 月初 // 月初
@Scheduled(cron="0 0 1 1 * ?") // @Scheduled(cron="0 0 1 1 * ?")
// @Scheduled(cron="*/5 * * * * ?") // @Scheduled(cron="*/5 * * * * ?")
@Async @Async
public void StandScheduledJobMonthBegin(){ 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 * * * * ?") // @Scheduled(cron="*/5 * * * * ?")
@Async @Async
public void StandScheduledJobMonthEnd(){ public void StandScheduledJobMonthEnd(){
@@ -154,7 +156,8 @@ public class StateSync {
// 判断当前日期是否为月末 // 判断当前日期是否为月末
Date date = new Date(); Date date = new Date();
if(isLastDayOfMonth(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 nextFirst = DateUtil.printDate(DateUtil.nextMonthFirstDate());
String nextFin = DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate())); String nextFin = DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate()));
String nextFinByQuery = DateUtil.addDay(DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate())),1); String nextFinByQuery = DateUtil.addDay(DateUtil.finOneDay(DateUtil.printDate(DateUtil.nextMonthFirstDate())),1);
@@ -233,9 +236,11 @@ public class StateSync {
bussionessStandStateService.updateBatchById(updList); 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 { }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){ }catch(Exception e){
logger.info(e.getMessage()); logger.info(e.getMessage());
@@ -156,6 +156,114 @@ public class SarBussionessStandEOPage extends BasePage {
private String XCSJBUSS; private String XCSJBUSS;
private String BARQ; private String BARQ;
private String XGD; 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() { public String getBARQ() {
return BARQ; return BARQ;
@@ -107,11 +107,13 @@ public class BussStandExportUtil {
break; break;
case "标准实施日期": case "标准实施日期":
String putTime=""; String putTime="";
if (Date.class.equals(sarStandardsInfoEO.getPutTime())) { if(sarStandardsInfoEO.getPutTime() != null){
putTime = sdf.format(sarStandardsInfoEO.getPutTime()); if (Date.class.equals(sarStandardsInfoEO.getPutTime())) {
putTime = sdf.format(sarStandardsInfoEO.getPutTime());
}else { }else {
putTime=sarStandardsInfoEO.getPutTime(); putTime=sarStandardsInfoEO.getPutTime();
}
} }
value = putTime; value = putTime;
break; break;
@@ -123,10 +125,12 @@ public class BussStandExportUtil {
break; break;
case "发布日期": case "发布日期":
String issueTime=""; String issueTime="";
if (Date.class.equals(sarStandardsInfoEO.getIssueTime().getClass())){ if(sarStandardsInfoEO.getIssueTime() != null){
issueTime = sdf.format(sarStandardsInfoEO.getIssueTime()); if (Date.class.equals(sarStandardsInfoEO.getIssueTime().getClass())){
}else { issueTime = sdf.format(sarStandardsInfoEO.getIssueTime());
issueTime=sarStandardsInfoEO.getIssueTime(); }else {
issueTime=sarStandardsInfoEO.getIssueTime();
}
} }
value = issueTime; value = issueTime;
break; break;
@@ -53,12 +53,14 @@
<if test="bussStandId != null" >buss_stand_id,</if> <if test="bussStandId != null" >buss_stand_id,</if>
<if test="id != null" >id,</if> <if test="id != null" >id,</if>
<if test="validFlag != null" >valid_flag,</if> <if test="validFlag != null" >valid_flag,</if>
<if test="treeType != null" >tree_type,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides="," > <trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="menuId != null" >#{menuId, jdbcType=VARCHAR},</if> <if test="menuId != null" >#{menuId, jdbcType=VARCHAR},</if>
<if test="bussStandId != null" >#{bussStandId, jdbcType=VARCHAR},</if> <if test="bussStandId != null" >#{bussStandId, jdbcType=VARCHAR},</if>
<if test="id != null" >#{id, jdbcType=VARCHAR},</if> <if test="id != null" >#{id, jdbcType=VARCHAR},</if>
<if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if> <if test="validFlag != null" >#{validFlag, jdbcType=INTEGER},</if>
<if test="treeType != null" >#{treeType, jdbcType=INTEGER},</if>
</trim> </trim>
</insert> </insert>
@@ -161,10 +163,15 @@
<select id="selectMenuByMenuParentId" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu"> <select id="selectMenuByMenuParentId" resultMap="BaseResultMap" parameterType="com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu">
select <include refid="Base_Column_List"/> from SAR_BUSS_STAND_MENU select <include refid="Base_Column_List"/> from SAR_BUSS_STAND_MENU
where buss_stand_id = #{bussStandId} and valid_flag=0 where buss_stand_id = #{bussStandId} and valid_flag=0
and MENU_ID in <if test="treeType != null and treeType != ''">
<foreach collection="menuIds" index="index" item="item" open="(" separator="," close=")"> and TREE_TYPE = #{treeType}
#{item} </if>
</foreach> <if test="menuIds != null and menuIds.size !=0">
and MENU_ID in
<foreach collection="menuIds" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</if>
</select> </select>
<update id="updateByStandIdAndMenuId" parameterType="com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu" > <update id="updateByStandIdAndMenuId" parameterType="com.adc.da.slrs.sarBussStandMenu.entity.SarBussStandMenu" >
@@ -375,7 +375,7 @@
FROM sar_bussioness_stand FROM sar_bussioness_stand
WHERE stand_sort = 'Q/QCBFC' WHERE stand_sort = 'Q/QCBFC'
AND ISSUE_TIME IS NOT NULL AND ISSUE_TIME IS NOT NULL
AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 5 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d') AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 3 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d')
BETWEEN DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_ADD(DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d'),INTERVAL 1 DAY) BETWEEN DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_ADD(DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d'),INTERVAL 1 DAY)
UNION UNION
SELECT SELECT
@@ -384,7 +384,7 @@
FROM sar_bussioness_stand FROM sar_bussioness_stand
WHERE stand_sort != 'Q/QCBFC' WHERE stand_sort != 'Q/QCBFC'
AND ISSUE_TIME IS NOT NULL AND ISSUE_TIME IS NOT NULL
AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 3 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d') AND DATE_FORMAT(DATE_SUB(DATE_ADD(ISSUE_TIME, INTERVAL 5 YEAR),INTERVAL 1 MONTH),'%Y-%m-%d')
BETWEEN DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_ADD(DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d'),INTERVAL 1 DAY) BETWEEN DATE_FORMAT(#{issueTimeStart}, '%Y-%m-%d') AND DATE_ADD(DATE_FORMAT(#{issueTimeEnd}, '%Y-%m-%d'),INTERVAL 1 DAY)
</select> </select>