change - 设备报表

master
yinq 2 years ago
parent 8331cdadf2
commit 355801cbd7

@ -56,7 +56,7 @@
<if test="proportion != null ">and bmwu.proportion = #{proportion}</if> <if test="proportion != null ">and bmwu.proportion = #{proportion}</if>
<if test="isFlag != null ">and bmwu.is_flag = #{isFlag}</if> <if test="isFlag != null ">and bmwu.is_flag = #{isFlag}</if>
</where> </where>
order by OBJ_ID order by bmwu.monitor_code
</select> </select>
<select id="selectBaseMonitorWorkUnitByObjId" parameterType="Long" resultMap="BaseMonitorWorkUnitResult"> <select id="selectBaseMonitorWorkUnitByObjId" parameterType="Long" resultMap="BaseMonitorWorkUnitResult">

@ -5,50 +5,69 @@
<mapper namespace="com.aucma.base.mapper.BaseWorkUnitMapper"> <mapper namespace="com.aucma.base.mapper.BaseWorkUnitMapper">
<resultMap type="BaseWorkUnit" id="BaseWorkUnitResult"> <resultMap type="BaseWorkUnit" id="BaseWorkUnitResult">
<result property="objId" column="obj_id" /> <result property="objId" column="obj_id"/>
<result property="workUnitCode" column="work_unit_code" /> <result property="workUnitCode" column="work_unit_code"/>
<result property="parentId" column="parent_id" /> <result property="parentId" column="parent_id"/>
<result property="workUnitName" column="work_unit_name" /> <result property="workUnitName" column="work_unit_name"/>
<result property="workUnitAddress" column="work_unit_address" /> <result property="workUnitAddress" column="work_unit_address"/>
<result property="ancestors" column="ancestors" /> <result property="ancestors" column="ancestors"/>
<result property="workUnitSort" column="work_unit_sort" /> <result property="workUnitSort" column="work_unit_sort"/>
<result property="productLineCode" column="product_line_code" /> <result property="productLineCode" column="product_line_code"/>
<result property="productLineName" column="product_line_name" /> <result property="productLineName" column="product_line_name"/>
<result property="workUnitType" column="work_unit_type" /> <result property="workUnitType" column="work_unit_type"/>
<result property="isFlag" column="is_flag" /> <result property="isFlag" column="is_flag"/>
<result property="createdBy" column="created_by" /> <result property="createdBy" column="created_by"/>
<result property="createdTime" column="created_time" /> <result property="createdTime" column="created_time"/>
<result property="updatedBy" column="updated_by" /> <result property="updatedBy" column="updated_by"/>
<result property="updatedTime" column="updated_time" /> <result property="updatedTime" column="updated_time"/>
</resultMap> </resultMap>
<sql id="selectBaseWorkUnitVo"> <sql id="selectBaseWorkUnitVo">
select obj_id, work_unit_code, parent_id, work_unit_name, work_unit_address, ancestors, work_unit_sort, product_line_code, work_unit_type, is_flag, created_by, created_time, updated_by, updated_time from base_work_unit select obj_id,
work_unit_code,
parent_id,
work_unit_name,
work_unit_address,
ancestors,
work_unit_sort,
product_line_code,
work_unit_type,
is_flag,
created_by,
created_time,
updated_by,
updated_time
from base_work_unit
</sql> </sql>
<select id="selectBaseWorkUnitList" parameterType="BaseWorkUnit" resultMap="BaseWorkUnitResult"> <select id="selectBaseWorkUnitList" parameterType="BaseWorkUnit" resultMap="BaseWorkUnitResult">
<include refid="selectBaseWorkUnitVo"/> <include refid="selectBaseWorkUnitVo"/>
<where> <where>
<if test="objId != null "> and obj_id = #{objId}</if> <if test="objId != null ">and obj_id = #{objId}</if>
<if test="workUnitCode != null and workUnitCode != ''"> and work_unit_code = #{workUnitCode}</if> <if test="workUnitCode != null and workUnitCode != ''">and work_unit_code = #{workUnitCode}</if>
<if test="parentId != null and parentId != ''"> and parent_id = #{parentId}</if> <if test="parentId != null and parentId != ''">and parent_id = #{parentId}</if>
<if test="workUnitName != null and workUnitName != ''"> and work_unit_name like concat(concat('%', #{workUnitName}), '%')</if> <if test="workUnitName != null and workUnitName != ''">and work_unit_name like concat(concat('%',
<if test="workUnitAddress != null and workUnitAddress != ''"> and work_unit_address = #{workUnitAddress}</if> #{workUnitName}), '%')
<if test="ancestors != null and ancestors != ''"> and ancestors = #{ancestors}</if> </if>
<if test="workUnitSort != null "> and work_unit_sort = #{workUnitSort}</if> <if test="workUnitAddress != null and workUnitAddress != ''">and work_unit_address = #{workUnitAddress}
<if test="productLineCode != null and productLineCode != ''"> and product_line_code = #{productLineCode}</if> </if>
<if test="workUnitType != null "> and work_unit_type = #{workUnitType}</if> <if test="ancestors != null and ancestors != ''">and ancestors = #{ancestors}</if>
<if test="isFlag != null "> and is_flag = #{isFlag}</if> <if test="workUnitSort != null ">and work_unit_sort = #{workUnitSort}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if> <if test="productLineCode != null and productLineCode != ''">and product_line_code = #{productLineCode}
<if test="createdTime != null "> and created_time = #{createdTime}</if> </if>
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if> <if test="workUnitType != null ">and work_unit_type = #{workUnitType}</if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if> <if test="isFlag != null ">and is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
<if test="createdTime != null ">and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
</where> </where>
order by work_unit_code
</select> </select>
<select id="selectBaseWorkUnitByObjId" parameterType="Long" resultMap="BaseWorkUnitResult"> <select id="selectBaseWorkUnitByObjId" parameterType="Long" resultMap="BaseWorkUnitResult">
<include refid="selectBaseWorkUnitVo"/> <include refid="selectBaseWorkUnitVo"/>
where obj_id = #{objId} where obj_id = #{objId}
</select> </select>
<insert id="insertBaseWorkUnit" parameterType="BaseWorkUnit"> <insert id="insertBaseWorkUnit" parameterType="BaseWorkUnit">
@ -57,61 +76,63 @@
</selectKey> </selectKey>
insert into base_work_unit insert into base_work_unit
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objId != null">obj_id,</if> <if test="objId != null">obj_id,</if>
<if test="workUnitCode != null and workUnitCode != ''">work_unit_code,</if> <if test="workUnitCode != null and workUnitCode != ''">work_unit_code,</if>
<if test="parentId != null">parent_id,</if> <if test="parentId != null">parent_id,</if>
<if test="workUnitName != null">work_unit_name,</if> <if test="workUnitName != null">work_unit_name,</if>
<if test="workUnitAddress != null">work_unit_address,</if> <if test="workUnitAddress != null">work_unit_address,</if>
<if test="ancestors != null">ancestors,</if> <if test="ancestors != null">ancestors,</if>
<if test="workUnitSort != null">work_unit_sort,</if> <if test="workUnitSort != null">work_unit_sort,</if>
<if test="productLineCode != null">product_line_code,</if> <if test="productLineCode != null">product_line_code,</if>
<if test="workUnitType != null">work_unit_type,</if> <if test="workUnitType != null">work_unit_type,</if>
<if test="isFlag != null">is_flag,</if> <if test="isFlag != null">is_flag,</if>
<if test="createdBy != null">created_by,</if> <if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if> <if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if> <if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if> <if test="updatedTime != null">updated_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if> <if test="objId != null">#{objId},</if>
<if test="workUnitCode != null and workUnitCode != ''">#{workUnitCode},</if> <if test="workUnitCode != null and workUnitCode != ''">#{workUnitCode},</if>
<if test="parentId != null">#{parentId},</if> <if test="parentId != null">#{parentId},</if>
<if test="workUnitName != null">#{workUnitName},</if> <if test="workUnitName != null">#{workUnitName},</if>
<if test="workUnitAddress != null">#{workUnitAddress},</if> <if test="workUnitAddress != null">#{workUnitAddress},</if>
<if test="ancestors != null">#{ancestors},</if> <if test="ancestors != null">#{ancestors},</if>
<if test="workUnitSort != null">#{workUnitSort},</if> <if test="workUnitSort != null">#{workUnitSort},</if>
<if test="productLineCode != null">#{productLineCode},</if> <if test="productLineCode != null">#{productLineCode},</if>
<if test="workUnitType != null">#{workUnitType},</if> <if test="workUnitType != null">#{workUnitType},</if>
<if test="isFlag != null">#{isFlag},</if> <if test="isFlag != null">#{isFlag},</if>
<if test="createdBy != null">#{createdBy},</if> <if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if> <if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if> <if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if> <if test="updatedTime != null">#{updatedTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateBaseWorkUnit" parameterType="BaseWorkUnit"> <update id="updateBaseWorkUnit" parameterType="BaseWorkUnit">
update base_work_unit update base_work_unit
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="workUnitCode != null and workUnitCode != ''">work_unit_code = #{workUnitCode},</if> <if test="workUnitCode != null and workUnitCode != ''">work_unit_code = #{workUnitCode},</if>
<if test="parentId != null">parent_id = #{parentId},</if> <if test="parentId != null">parent_id = #{parentId},</if>
<if test="workUnitName != null">work_unit_name = #{workUnitName},</if> <if test="workUnitName != null">work_unit_name = #{workUnitName},</if>
<if test="workUnitAddress != null">work_unit_address = #{workUnitAddress},</if> <if test="workUnitAddress != null">work_unit_address = #{workUnitAddress},</if>
<if test="ancestors != null">ancestors = #{ancestors},</if> <if test="ancestors != null">ancestors = #{ancestors},</if>
<if test="workUnitSort != null">work_unit_sort = #{workUnitSort},</if> <if test="workUnitSort != null">work_unit_sort = #{workUnitSort},</if>
<if test="productLineCode != null">product_line_code = #{productLineCode},</if> <if test="productLineCode != null">product_line_code = #{productLineCode},</if>
<if test="workUnitType != null">work_unit_type = #{workUnitType},</if> <if test="workUnitType != null">work_unit_type = #{workUnitType},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if> <if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="createdBy != null">created_by = #{createdBy},</if> <if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if> <if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if> <if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if> <if test="updatedTime != null">updated_time = #{updatedTime},</if>
</trim> </trim>
where obj_id = #{objId} where obj_id = #{objId}
</update> </update>
<delete id="deleteBaseWorkUnitByObjId" parameterType="Long"> <delete id="deleteBaseWorkUnitByObjId" parameterType="Long">
delete from base_work_unit where obj_id = #{objId} delete
from base_work_unit
where obj_id = #{objId}
</delete> </delete>
<delete id="deleteBaseWorkUnitByObjIds" parameterType="String"> <delete id="deleteBaseWorkUnitByObjIds" parameterType="String">

@ -53,9 +53,10 @@ public class ProductionReportController extends BaseController {
* *
*/ */
@GetMapping("/productionExecutionReportList") @GetMapping("/productionExecutionReportList")
public AjaxResult productionExecutionReportList(@RequestParam(required = false) Map hashMap) { public TableDataInfo productionExecutionReportList(@RequestParam(required = false) Map hashMap) {
startPage();
List<ProductionExecutionReport> list = productionReportService.productionExecutionReportList(hashMap); List<ProductionExecutionReport> list = productionReportService.productionExecutionReportList(hashMap);
return success(list); return getDataTable(list);
} }
/** /**
@ -65,18 +66,21 @@ public class ProductionReportController extends BaseController {
*/ */
@PostMapping("/productionExecutionReportList/export") @PostMapping("/productionExecutionReportList/export")
public void productionExecutionReportListExport(HttpServletResponse response, @RequestParam(required = false) Map hashMap) { public void productionExecutionReportListExport(HttpServletResponse response, @RequestParam(required = false) Map hashMap) {
hashMap.put("pageNum",null);
hashMap.put("pageSize",null);
List<ProductionExecutionReport> list = productionReportService.productionExecutionReportList(hashMap); List<ProductionExecutionReport> list = productionReportService.productionExecutionReportList(hashMap);
ExcelUtil<ProductionExecutionReport> util = new ExcelUtil<>(ProductionExecutionReport. class); ExcelUtil<ProductionExecutionReport> util = new ExcelUtil<>(ProductionExecutionReport. class);
util.exportExcel(response, list, "清单率报表" ); util.exportExcel(response, list, "查询生产执行报表" );
} }
/** /**
* *
*/ */
@GetMapping("/WIPInquiryReportList") @GetMapping("/WIPInquiryReportList")
public AjaxResult WIPInquiryReportList(@RequestParam(required = false) Map hashMap) { public TableDataInfo WIPInquiryReportList(@RequestParam(required = false) Map hashMap) {
startPage();
List<WIPInquiryReport> list = productionReportService.WIPInquiryReportList(hashMap); List<WIPInquiryReport> list = productionReportService.WIPInquiryReportList(hashMap);
return success(list); return getDataTable(list);
} }
/** /**
@ -86,6 +90,8 @@ public class ProductionReportController extends BaseController {
*/ */
@PostMapping("/WIPInquiryReportList/export") @PostMapping("/WIPInquiryReportList/export")
public void WIPInquiryReportListExport(HttpServletResponse response, @RequestParam(required = false) Map hashMap) { public void WIPInquiryReportListExport(HttpServletResponse response, @RequestParam(required = false) Map hashMap) {
hashMap.put("pageNum",null);
hashMap.put("pageSize",null);
List<WIPInquiryReport> list = productionReportService.WIPInquiryReportList(hashMap); List<WIPInquiryReport> list = productionReportService.WIPInquiryReportList(hashMap);
ExcelUtil<WIPInquiryReport> util = new ExcelUtil<>(WIPInquiryReport. class); ExcelUtil<WIPInquiryReport> util = new ExcelUtil<>(WIPInquiryReport. class);
util.exportExcel(response, list, "清单率报表" ); util.exportExcel(response, list, "清单率报表" );

@ -29,6 +29,12 @@ public class ReportDayDnb extends BaseEntity {
@Excel(name = "计量设备编号") @Excel(name = "计量设备编号")
private String monitorCode; private String monitorCode;
/**
*
*/
@Excel(name = "计量设备名称")
private String monitorName;
/** /**
* *
*/ */
@ -50,47 +56,49 @@ public class ReportDayDnb extends BaseEntity {
/** /**
* *
*/ */
@Excel(name = "开始时间")
private String beginTime; private String beginTime;
/** /**
* *
*/ */
@Excel(name = "结束时间")
private String endTime; private String endTime;
/** /**
* *
*/ */
@Excel(name = "是否标识")
private Long isFlag; private Long isFlag;
/** /**
* *
*/ */
@Excel(name = "创建人")
private String createdBy; private String createdBy;
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date createdTime; private Date createdTime;
/** /**
* *
*/ */
@Excel(name = "更新人")
private String updatedBy; private String updatedBy;
/** /**
* *
*/ */
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
private Date updatedTime; private Date updatedTime;
public String getMonitorName() {
return monitorName;
}
public void setMonitorName(String monitorName) {
this.monitorName = monitorName;
}
public void setObjId(Long objId) { public void setObjId(Long objId) {
this.objId = objId; this.objId = objId;
} }

@ -5,101 +5,115 @@
<mapper namespace="com.aucma.report.mapper.ReportDayDnbMapper"> <mapper namespace="com.aucma.report.mapper.ReportDayDnbMapper">
<resultMap type="ReportDayDnb" id="ReportDayDnbResult"> <resultMap type="ReportDayDnb" id="ReportDayDnbResult">
<result property="objId" column="obj_id" /> <result property="objId" column="obj_id"/>
<result property="monitorCode" column="monitor_code" /> <result property="monitorCode" column="monitor_code"/>
<result property="instrumentValue" column="instrument_value" /> <result property="monitorName" column="monitor_name"/>
<result property="expend" column="expend" /> <result property="instrumentValue" column="instrument_value"/>
<result property="reportDate" column="report_date" /> <result property="expend" column="expend"/>
<result property="beginTime" column="begin_time" /> <result property="reportDate" column="report_date"/>
<result property="endTime" column="end_time" /> <result property="beginTime" column="begin_time"/>
<result property="isFlag" column="is_flag" /> <result property="endTime" column="end_time"/>
<result property="createdBy" column="created_by" /> <result property="isFlag" column="is_flag"/>
<result property="createdTime" column="created_time" /> <result property="createdBy" column="created_by"/>
<result property="updatedBy" column="updated_by" /> <result property="createdTime" column="created_time"/>
<result property="updatedTime" column="updated_time" /> <result property="updatedBy" column="updated_by"/>
<result property="updatedTime" column="updated_time"/>
</resultMap> </resultMap>
<sql id="selectReportDayDnbVo"> <sql id="selectReportDayDnbVo">
select obj_id, monitor_code, instrument_value, expend, report_date, begin_time, end_time, is_flag, created_by, created_time, updated_by, updated_time from report_day_dnb select rpd.monitor_code,
bm.MONITOR_NAME,
MAX(rpd.instrument_value) instrument_value,
SUM(rpd.expend) expend,
SUBSTR(rpd.begin_time, 1, 10) report_date
from report_point_dnb rpd
left join BASE_MONITORINFO bm on bm.MONITOR_CODE = rpd.MONITOR_CODE
</sql> </sql>
<select id="selectReportDayDnbList" parameterType="ReportDayDnb" resultMap="ReportDayDnbResult"> <select id="selectReportDayDnbList" parameterType="ReportDayDnb" resultMap="ReportDayDnbResult">
<include refid="selectReportDayDnbVo"/> <include refid="selectReportDayDnbVo"/>
<where> <where>
<if test="monitorCode != null and monitorCode != ''"> and monitor_code = #{monitorCode}</if> <if test="monitorCode != null and monitorCode != ''">and rpd.monitor_code = #{monitorCode}</if>
<if test="instrumentValue != null "> and instrument_value = #{instrumentValue}</if> <if test="instrumentValue != null ">and instrument_value = #{instrumentValue}</if>
<if test="expend != null "> and expend = #{expend}</if> <if test="expend != null ">and expend = #{expend}</if>
<if test="reportDate != null and reportDate != ''"> and report_date = #{reportDate}</if> <if test="reportDate != null and reportDate != ''">and report_date = #{reportDate}</if>
<if test="beginTime != null and beginTime != ''"> and begin_time = #{beginTime}</if> <if test="beginTime != null and beginTime != ''">and begin_time = #{beginTime}</if>
<if test="endTime != null and endTime != ''"> and end_time = #{endTime}</if> <if test="endTime != null and endTime != ''">and end_time = #{endTime}</if>
<if test="isFlag != null "> and is_flag = #{isFlag}</if> <if test="isFlag != null ">and is_flag = #{isFlag}</if>
<if test="createdBy != null and createdBy != ''"> and created_by = #{createdBy}</if> <if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
<if test="createdTime != null "> and created_time = #{createdTime}</if> and SUBSTR(rpd.begin_time, 1, 10) between #{params.beginCollectTime} and #{params.endCollectTime}
<if test="updatedBy != null and updatedBy != ''"> and updated_by = #{updatedBy}</if> </if>
<if test="updatedTime != null "> and updated_time = #{updatedTime}</if> <if test="createdBy != null and createdBy != ''">and created_by = #{createdBy}</if>
<if test="createdTime != null ">and created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and updated_time = #{updatedTime}</if>
</where> </where>
GROUP BY rpd.monitor_code, bm.MONITOR_NAME, SUBSTR(rpd.begin_time, 1, 10)
order by report_date,rpd.monitor_code
</select> </select>
<select id="selectReportDayDnbByObjId" parameterType="Long" resultMap="ReportDayDnbResult"> <select id="selectReportDayDnbByObjId" parameterType="Long" resultMap="ReportDayDnbResult">
<include refid="selectReportDayDnbVo"/> <include refid="selectReportDayDnbVo"/>
where obj_id = #{objId} where rpd.obj_id = #{objId}
</select> </select>
<insert id="insertReportDayDnb" parameterType="ReportDayDnb"> <insert id="insertReportDayDnb" parameterType="ReportDayDnb">
<selectKey keyProperty="objId" resultType="long" order="BEFORE"> <selectKey keyProperty="objId" resultType="long" order="BEFORE">
SELECT seq_report_day_dnb.NEXTVAL as objId FROM DUAL SELECT seq_report_day_dnb.NEXTVAL as objId FROM DUAL
</selectKey> </selectKey>
insert into report_day_dnb insert into report_day_dnb
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
<if test="objId != null">obj_id,</if> <if test="objId != null">obj_id,</if>
<if test="monitorCode != null">monitor_code,</if> <if test="monitorCode != null">monitor_code,</if>
<if test="instrumentValue != null">instrument_value,</if> <if test="instrumentValue != null">instrument_value,</if>
<if test="expend != null">expend,</if> <if test="expend != null">expend,</if>
<if test="reportDate != null">report_date,</if> <if test="reportDate != null">report_date,</if>
<if test="beginTime != null">begin_time,</if> <if test="beginTime != null">begin_time,</if>
<if test="endTime != null">end_time,</if> <if test="endTime != null">end_time,</if>
<if test="isFlag != null">is_flag,</if> <if test="isFlag != null">is_flag,</if>
<if test="createdBy != null">created_by,</if> <if test="createdBy != null">created_by,</if>
<if test="createdTime != null">created_time,</if> <if test="createdTime != null">created_time,</if>
<if test="updatedBy != null">updated_by,</if> <if test="updatedBy != null">updated_by,</if>
<if test="updatedTime != null">updated_time,</if> <if test="updatedTime != null">updated_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="objId != null">#{objId},</if> <if test="objId != null">#{objId},</if>
<if test="monitorCode != null">#{monitorCode},</if> <if test="monitorCode != null">#{monitorCode},</if>
<if test="instrumentValue != null">#{instrumentValue},</if> <if test="instrumentValue != null">#{instrumentValue},</if>
<if test="expend != null">#{expend},</if> <if test="expend != null">#{expend},</if>
<if test="reportDate != null">#{reportDate},</if> <if test="reportDate != null">#{reportDate},</if>
<if test="beginTime != null">#{beginTime},</if> <if test="beginTime != null">#{beginTime},</if>
<if test="endTime != null">#{endTime},</if> <if test="endTime != null">#{endTime},</if>
<if test="isFlag != null">#{isFlag},</if> <if test="isFlag != null">#{isFlag},</if>
<if test="createdBy != null">#{createdBy},</if> <if test="createdBy != null">#{createdBy},</if>
<if test="createdTime != null">#{createdTime},</if> <if test="createdTime != null">#{createdTime},</if>
<if test="updatedBy != null">#{updatedBy},</if> <if test="updatedBy != null">#{updatedBy},</if>
<if test="updatedTime != null">#{updatedTime},</if> <if test="updatedTime != null">#{updatedTime},</if>
</trim> </trim>
</insert> </insert>
<update id="updateReportDayDnb" parameterType="ReportDayDnb"> <update id="updateReportDayDnb" parameterType="ReportDayDnb">
update report_day_dnb update report_day_dnb
<trim prefix="SET" suffixOverrides=","> <trim prefix="SET" suffixOverrides=",">
<if test="monitorCode != null">monitor_code = #{monitorCode},</if> <if test="monitorCode != null">monitor_code = #{monitorCode},</if>
<if test="instrumentValue != null">instrument_value = #{instrumentValue},</if> <if test="instrumentValue != null">instrument_value = #{instrumentValue},</if>
<if test="expend != null">expend = #{expend},</if> <if test="expend != null">expend = #{expend},</if>
<if test="reportDate != null">report_date = #{reportDate},</if> <if test="reportDate != null">report_date = #{reportDate},</if>
<if test="beginTime != null">begin_time = #{beginTime},</if> <if test="beginTime != null">begin_time = #{beginTime},</if>
<if test="endTime != null">end_time = #{endTime},</if> <if test="endTime != null">end_time = #{endTime},</if>
<if test="isFlag != null">is_flag = #{isFlag},</if> <if test="isFlag != null">is_flag = #{isFlag},</if>
<if test="createdBy != null">created_by = #{createdBy},</if> <if test="createdBy != null">created_by = #{createdBy},</if>
<if test="createdTime != null">created_time = #{createdTime},</if> <if test="createdTime != null">created_time = #{createdTime},</if>
<if test="updatedBy != null">updated_by = #{updatedBy},</if> <if test="updatedBy != null">updated_by = #{updatedBy},</if>
<if test="updatedTime != null">updated_time = #{updatedTime},</if> <if test="updatedTime != null">updated_time = #{updatedTime},</if>
</trim> </trim>
where obj_id = #{objId} where obj_id = #{objId}
</update> </update>
<delete id="deleteReportDayDnbByObjId" parameterType="Long"> <delete id="deleteReportDayDnbByObjId" parameterType="Long">
delete from report_day_dnb where obj_id = #{objId} delete
from report_day_dnb
where obj_id = #{objId}
</delete> </delete>
<delete id="deleteReportDayDnbByObjIds" parameterType="String"> <delete id="deleteReportDayDnbByObjIds" parameterType="String">

@ -49,12 +49,15 @@
<if test="beginTime != null and beginTime != ''">and rpd.begin_time = #{beginTime}</if> <if test="beginTime != null and beginTime != ''">and rpd.begin_time = #{beginTime}</if>
<if test="endTime != null and endTime != ''">and rpd.end_time = #{endTime}</if> <if test="endTime != null and endTime != ''">and rpd.end_time = #{endTime}</if>
<if test="isFlag != null ">and rpd.is_flag = #{isFlag}</if> <if test="isFlag != null ">and rpd.is_flag = #{isFlag}</if>
<if test="params.beginCollectTime != null and params.beginCollectTime != '' and params.endCollectTime != null and params.endCollectTime != ''">
and rpd.begin_time between #{params.beginCollectTime} and #{params.endCollectTime}
</if>
<if test="createdBy != null and createdBy != ''">and rpd.created_by = #{createdBy}</if> <if test="createdBy != null and createdBy != ''">and rpd.created_by = #{createdBy}</if>
<if test="createdTime != null ">and rpd.created_time = #{createdTime}</if> <if test="createdTime != null ">and rpd.created_time = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''">and rpd.updated_by = #{updatedBy}</if> <if test="updatedBy != null and updatedBy != ''">and rpd.updated_by = #{updatedBy}</if>
<if test="updatedTime != null ">and rpd.updated_time = #{updatedTime}</if> <if test="updatedTime != null ">and rpd.updated_time = #{updatedTime}</if>
</where> </where>
order by rpd.OBJ_ID order by rpd.begin_time DESC
</select> </select>
<select id="selectReportPointDnbByObjId" parameterType="Long" resultMap="ReportPointDnbResult"> <select id="selectReportPointDnbByObjId" parameterType="Long" resultMap="ReportPointDnbResult">

Loading…
Cancel
Save