首页标准发布 只查询文本状态为即将实施的数据

This commit is contained in:
zhaokaiyao@91isoft.com
2021-09-16 19:27:36 +08:00
parent 3eb2ddce1e
commit ccf7d32945
3 changed files with 35 additions and 4 deletions
@@ -31,7 +31,7 @@ public interface SarStandardsInfoDao extends BaseMapper<SarStandardsInfo> {
List<SarStandardsInfo> selectStandardsByStandnumber(SarStandardsInfo sarStandardsInfoEO);
List<SarStandardsInfo> queryStandInfoByList(@Param("limit") Integer limit);
List<SarStandardsInfo> queryStandInfoByList(@Param("limit") Integer limit,@Param("typeCode") String typeCode);
Integer selectStandColumn(@Param("columnName") String columnName);
@@ -49,6 +49,10 @@ import com.adc.da.slrs.sarStandardsInfo.service.ISarStandardsInfoService;
import com.adc.da.slrs.sarUpdLog.service.ISarUpdLogService;
import com.adc.da.slrs.sarUser.service.ITsUserService;
import com.adc.da.slrs.sysInfo.service.SysInfoEOService;
import com.adc.da.slrs.tsDictionaryType.dao.TsDicTypeDao;
import com.adc.da.slrs.tsDictionaryType.dao.TsDictionaryDao;
import com.adc.da.slrs.tsDictionaryType.entity.TsDicType;
import com.adc.da.slrs.tsDictionaryType.entity.TsDictionary;
import com.adc.da.sys.common.SelectionResult;
import com.adc.da.sys.constant.ValueStateEnum;
import com.adc.da.sys.dao.DicTypeEODao;
@@ -203,6 +207,12 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
@Autowired
private StandLawsSearchService standLawsSearchService;
@Autowired
private TsDictionaryDao tsDictionaryDao;
@Autowired
private TsDicTypeDao tsDicTypeDao;
// /**
// * 反向操作标准
// */
@@ -2032,9 +2042,28 @@ public class SarStandardsInfoServiceImpl extends ServiceImpl<SarStandardsInfoDao
return strhours;
}
@Override
public List<SarStandardsInfo> getStandInfoByList(String limit){
return dao.queryStandInfoByList(Integer.valueOf(limit));
//查询文本状态为即将实施的
QueryWrapper<TsDictionary> dictionaryWrapper = new QueryWrapper<>();
dictionaryWrapper.select("ID")
.eq("DICTIONARY_NAME","文本状态");
List<Map<String, Object>> dicMaps = tsDictionaryDao.selectMaps(dictionaryWrapper);
QueryWrapper<TsDicType> dicTypeWrapper = new QueryWrapper<>();
dicTypeWrapper.select("DIC_TYPE_CODE")
.eq("DIC_ID",dicMaps.get(0).get("ID").toString())
.eq("DIC_TYPE_NAME","即将实施");
List<Map<String, Object>> typeMaps = tsDicTypeDao.selectMaps(dicTypeWrapper);
List<SarStandardsInfo> standInfoList = dao.queryStandInfoByList(Integer.valueOf(limit), typeMaps.get(0).get("DIC_TYPE_CODE").toString());
return standInfoList;
}
/**
@@ -646,12 +646,14 @@
</if>
</select>
<select id="queryStandInfoByList" resultMap="BaseResultMap" parameterType="java.lang.Integer">
<select id="queryStandInfoByList" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
FROM sar_standards_info
LEFT JOIN sar_stand_attr_info ssai ON ssai.STAND_ID = SAR_STANDARDS_INFO.ID
WHERE DATE_FORMAT(ssai.SSRQ,'%Y-%m-%D') &gt;= DATE_FORMAT(SAR_STANDARDS_INFO.ISSUE_TIME,'%Y-%m-%D')
WHERE
sar_standards_info.VALID_FLAG='0'
AND TEXT_STATUS=#{typeCode}
ORDER BY SAR_STANDARDS_INFO.ISSUE_TIME DESC
LIMIT #{limit}
</select>