change - add电流电压曲线接口

main
yinq 5 months ago
parent 92da9bae1d
commit 5a8921b103

@ -3,6 +3,7 @@ package com.os.ems.record.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.checkerframework.checker.units.qual.A;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@ -45,6 +46,17 @@ public class EmsRecordDnbInstantController extends BaseController {
return getDataTable(list);
}
/**
*
* @param emsRecordDnbInstant
* @return
*/
@GetMapping("/dnbInstantList")
public AjaxResult dnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant) {
List<EmsRecordDnbInstant> list = emsRecordDnbInstantService.selectDnbInstantList(emsRecordDnbInstant);
return success(list);
}
/**
*
*/

@ -34,28 +34,28 @@ public class EmsRecordDnbInstant extends BaseEntity
@Excel(name = "采集时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date collectTime;
/** A电压 */
@Excel(name = "A电压")
/** A电压 */
@Excel(name = "A电压")
private BigDecimal vA;
/** B电压 */
@Excel(name = "B电压")
/** B电压 */
@Excel(name = "B电压")
private BigDecimal vB;
/** C电压 */
@Excel(name = "C电压")
/** C电压 */
@Excel(name = "C电压")
private BigDecimal vC;
/** A电流 */
@Excel(name = "A电流")
/** A电流 */
@Excel(name = "A电流")
private BigDecimal iA;
/** B电流 */
@Excel(name = "B电流")
/** B电流 */
@Excel(name = "B电流")
private BigDecimal iB;
/** C电流 */
@Excel(name = "C电流")
/** C电流 */
@Excel(name = "C电流")
private BigDecimal iC;
/** 记录时间 */

@ -58,4 +58,11 @@ public interface EmsRecordDnbInstantMapper
* @return
*/
public int deleteEmsRecordDnbInstantByObjIds(Long[] objIds);
/**
*
* @param emsRecordDnbInstant
* @return
*/
List<EmsRecordDnbInstant> selectDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant);
}

@ -58,4 +58,11 @@ public interface IEmsRecordDnbInstantService {
* @return
*/
public int deleteEmsRecordDnbInstantByObjId(Long objId);
/**
*
* @param emsRecordDnbInstant
* @return
*/
List<EmsRecordDnbInstant> selectDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant);
}

@ -86,4 +86,14 @@ public class EmsRecordDnbInstantServiceImpl implements IEmsRecordDnbInstantServi
public int deleteEmsRecordDnbInstantByObjId(Long objId) {
return emsRecordDnbInstantMapper.deleteEmsRecordDnbInstantByObjId(objId);
}
/**
*
* @param emsRecordDnbInstant
* @return
*/
@Override
public List<EmsRecordDnbInstant> selectDnbInstantList(EmsRecordDnbInstant emsRecordDnbInstant) {
return emsRecordDnbInstantMapper.selectDnbInstantList(emsRecordDnbInstant);
}
}

@ -74,6 +74,19 @@
where rdi.obj_id = #{objId}
</select>
<select id="selectDnbInstantList" parameterType="EmsRecordDnbInstant" resultMap="EmsRecordDnbInstantResult">
<include refid="selectEmsRecordDnbInstantVo"/>
<where>
<if test="objId != null and objId != ''">and rdi.obj_id = #{objId}</if>
<if test="monitorCode != null and monitorCode != ''">and rdi.monitor_code = #{monitorCode}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
and rdi.collect_time between #{params.beginCollectTime} and #{params.endCollectTime}</if>
<if test="params.beginRecordTime != null and params.beginRecordTime != '' and params.endRecordTime != null and params.endRecordTime != ''">
and rdi.record_time between #{params.beginRecordTime} and #{params.endRecordTime}</if>
</where>
order by rdi.collect_time
</select>
<insert id="insertEmsRecordDnbInstant" parameterType="EmsRecordDnbInstant" useGeneratedKeys="true"
keyProperty="objId">
insert into ems_record_dnb_instant

@ -134,7 +134,7 @@ public class ERPPortServiceImpl implements IERPPortService {
HashMap returnData = (HashMap)hashMap.get("ReturnData");
HashMap<String, Object> data = (HashMap<String, Object>)returnData.get("data");
latestSalary = resultMapper.readValue(objectMapper.writeValueAsString(data), LatestSalary.class);
} catch (JsonProcessingException e) {
} catch (Exception e) {
logger.warn("获取最新工资系数异常:" + requestParam + "|" + result + "|" + e);
}
return latestSalary;

@ -10,6 +10,7 @@
<result property="processName" column="process_name"/>
<result property="processType" column="process_type"/>
<result property="productLineCode" column="product_line_code"/>
<result property="productLineName" column="product_line_name"/>
<result property="stationCodes" column="station_codes"/>
<result property="capacityDay" column="capacity_day"/>
<result property="capacityMonth" column="capacity_month"/>
@ -26,6 +27,7 @@
bpi.process_name,
bpi.process_type,
bpi.product_line_code,
PL.product_line_name,
bpi.station_codes,
bpi.capacity_day,
bpi.capacity_month,
@ -35,6 +37,7 @@
bpi.update_by,
bpi.update_time
from base_process_info bpi
LEFT JOIN base_product_line PL ON PL.PRODUCT_LINE_CODE = bpi.product_line_code
</sql>
<!--SELECT ST.process_code,
ST.station_code,

Loading…
Cancel
Save