Commit 6800ed31 authored by ZWT's avatar ZWT

得到的

parent 3895a61d
......@@ -593,6 +593,11 @@ public class ExcelService {
@XText("市电峰谷配置导入")
@XApiUpload
public XServiceResult importPriceStrategy(XContext context, ImportPriceStrategyExcelInput input) {
//封装数据
String strategyId = input.getStrategyId();
if (CharSequenceUtil.isBlank(strategyId) || CharSequenceUtil.equals("undefined", strategyId)) {
return XServiceResult.OK;
}
List<ExcelPriceStrategyTemplate> list = EasyExcelUtil.getExcelDataAndCheck(input.getFile(), ExcelPriceStrategyTemplate.class,
null, null);
if (CollUtil.isEmpty(list)) {
......@@ -649,8 +654,6 @@ public class ExcelService {
if (stringBuilder.length() > 0) {
throw new XServiceException(stringBuilder.toString());
}
//封装数据
String strategyId = input.getStrategyId();
PpsUserSession session = context.getSession(PpsUserSession.class);
Map<String, String> dictMap = ServiceUtil.getDictionaryList(context, BusinessConstant.TIME_FRAME).stream()
.collect(Collectors.toMap(GetSysDictionaryViewOutput::getDicName, GetSysDictionaryViewOutput::getDicKey));
......
......@@ -137,7 +137,7 @@
</insert>
<select id="selectDetailList" parameterType="pps.core.base.entity.BasePriceStrategyDetailView"
resultMap="BaseResultMap">
resultMap="BaseResultMap" databaseId="MySQL">
SELECT D.STRATEGY_MONTH,
D.PERIOD_TYPE_KEY,
D.START_TIME,
......@@ -158,4 +158,28 @@
ORDER BY CAST(M.STRATEGY_MONTH AS SIGNED INTEGER),
D.START_TIME
</select>
<select id="selectDetailList" parameterType="pps.core.base.entity.BasePriceStrategyDetailView"
resultMap="BaseResultMap" databaseId="Oracle">
SELECT D.STRATEGY_MONTH,
D.PERIOD_TYPE_KEY,
D.START_TIME,
D.END_TIME,
D.ELECTROVALENCE
FROM BASE_PRICE_STRATEGY_MONTH M
LEFT JOIN BASE_PRICE_STRATEGY_DETAIL D ON M.STRATEGY_MONTH = D.STRATEGY_MONTH
AND M.STRATEGY_ID = D.STRATEGY_ID
WHERE M.IS_DELETED = 1
AND D.IS_DELETED = 1
AND M.STRATEGY_ID = #{strategyId}
<if test="monthList != null and monthList.size() > 0">
AND M.STRATEGY_MONTH IN
<foreach collection="monthList" item="item" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
ORDER BY
TO_NUMBER( M.STRATEGY_MONTH ),
D.START_TIME
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment