Commit db6ce7a2 authored by hezhuozhi's avatar hezhuozhi

人大金仓适配

parent fff556ba
......@@ -134,7 +134,7 @@ public class IdxBizPvWeightController extends BaseController {
if (!ObjectUtils.isEmpty(stdUserEmpower)) {
orgCode = stdUserEmpower.getAmosOrgCode().get(0);
}
QueryWrapper< IdxBizPvWeight> qu=new QueryWrapper<>();
// QueryWrapper< IdxBizPvWeight> qu=new QueryWrapper<>();
String name="";
IdxBizPvWeight qt=new IdxBizPvWeight();
switch(type){
......@@ -170,11 +170,12 @@ public class IdxBizPvWeightController extends BaseController {
// qu.eq("POINT_NAME",pointName);
break;
}
qu.like("ORG_CODE",orgCode);
qu.isNotNull(name);
qu.groupBy(name);
qu.orderByAsc(name);
List<IdxBizPvWeight> list = idxBizPvWeightMapper.selectList(qu);
// qu.like("ORG_CODE",orgCode);
// qu.isNotNull(name);
// qu.groupBy(name);
// qu.orderByAsc(name);
// List<IdxBizPvWeight> list = idxBizPvWeightMapper.selectList(qu);
List<IdxBizPvWeight> list = idxBizPvWeightMapper.selectAllByParams(name,"%"+orgCode+"%");;
return ResponseHelper.buildResponse(list);
}
......
......@@ -2,6 +2,9 @@ package com.yeejoin.amos.boot.module.jxiop.biz.mapper2;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @description:
......@@ -11,4 +14,5 @@ import com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight;
public interface IdxBizPvWeightMapper extends BaseMapper<IdxBizPvWeight> {
List<IdxBizPvWeight> selectAllByParams(@Param("name") String name, @Param("orgCode") String orgCode);
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.yeejoin.amos.boot.module.jxiop.biz.mapper2.IdxBizPvWeightMapper">
<select id="selectAllByParams" resultType="com.yeejoin.amos.boot.module.jxiop.biz.entity.IdxBizPvWeight">
SELECT ibpw.sequence_nbr,FLAG,ORG_CODE,POINT_NAME,STATION,ARAE,EQUIPMENT_NAME,TYPE,VALUE,SUBARRAY
FROM (SELECT MIN(sequence_nbr) as sequence_nbr
FROM idx_biz_pv_weight WHERE (ORG_CODE LIKE #{orgCode} AND ARAE IS NOT NULL)
GROUP BY ${name} ORDER BY ${name} ASC)aa
LEFT JOIN idx_biz_pv_weight ibpw ON ibpw.sequence_nbr=aa.sequence_nbr
</select>
</mapper>
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