1.8.3
DMS:完成PDA接口包括: 1、点巡检接口(获取点检或巡检任务、扫描设备验证、提交巡检) 2、故障报修接口(获取故障类别、获取涉及操作、获取维修类型) 3、维修接口(获取故障报修工单列表、获取报修工单明细、修改工单、维修获取明细、扫描验证、开始维修、完成维修) 4、保养工单接口(获取保养工单、开始保养、完成保养) 5、润滑工单接口(获取润滑工单、开始润滑、完成润滑)master
parent
28576f6ffa
commit
2bad839d2b
@ -0,0 +1,158 @@
|
||||
package com.hw.dms.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.io.IOException;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.hw.dms.domain.DmsBaseDeviceLedger;
|
||||
import com.hw.dms.domain.DmsBaseLubeStandard;
|
||||
import com.hw.dms.domain.DmsBaseLubeStation;
|
||||
import com.hw.dms.service.IDmsBaseDeviceLedgerService;
|
||||
import com.hw.dms.service.IDmsBaseLubeStandardService;
|
||||
import com.hw.dms.service.IDmsBaseLubeStationService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import com.hw.common.log.annotation.Log;
|
||||
import com.hw.common.log.enums.BusinessType;
|
||||
import com.hw.common.security.annotation.RequiresPermissions;
|
||||
import com.hw.dms.domain.DmsPlanLubeDetail;
|
||||
import com.hw.dms.service.IDmsPlanLubeDetailService;
|
||||
import com.hw.common.core.web.controller.BaseController;
|
||||
import com.hw.common.core.web.domain.AjaxResult;
|
||||
import com.hw.common.core.utils.poi.ExcelUtil;
|
||||
import com.hw.common.core.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 润滑计划明细Controller
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-03-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/dmsPlanLubeDetail")
|
||||
public class DmsPlanLubeDetailController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IDmsPlanLubeDetailService dmsPlanLubeDetailService;
|
||||
|
||||
@Autowired
|
||||
private IDmsBaseLubeStandardService dmsBaseLubeStandardService;
|
||||
|
||||
@Autowired
|
||||
private IDmsBaseLubeStationService dmsBaseLubeStationService;
|
||||
|
||||
@Autowired
|
||||
private IDmsBaseDeviceLedgerService dmsBaseDeviceLedgerService;
|
||||
|
||||
/**
|
||||
* 查询润滑计划明细列表
|
||||
*/
|
||||
@RequiresPermissions("dms:dmsPlanLubeDetail:list")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(DmsPlanLubeDetail dmsPlanLubeDetail)
|
||||
{
|
||||
startPage();
|
||||
List<DmsPlanLubeDetail> list = dmsPlanLubeDetailService.selectDmsPlanLubeDetailList(dmsPlanLubeDetail);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出润滑计划明细列表
|
||||
*/
|
||||
@RequiresPermissions("dms:dmsPlanLubeDetail:export")
|
||||
@Log(title = "润滑计划明细", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, DmsPlanLubeDetail dmsPlanLubeDetail)
|
||||
{
|
||||
List<DmsPlanLubeDetail> list = dmsPlanLubeDetailService.selectDmsPlanLubeDetailList(dmsPlanLubeDetail);
|
||||
ExcelUtil<DmsPlanLubeDetail> util = new ExcelUtil<DmsPlanLubeDetail>(DmsPlanLubeDetail.class);
|
||||
util.exportExcel(response, list, "润滑计划明细数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取润滑计划明细详细信息
|
||||
*/
|
||||
@RequiresPermissions("dms:dmsPlanLubeDetail:query")
|
||||
@GetMapping(value = "/{planLubeDetailId}")
|
||||
public AjaxResult getInfo(@PathVariable("planLubeDetailId") Long planLubeDetailId)
|
||||
{
|
||||
return success(dmsPlanLubeDetailService.selectDmsPlanLubeDetailByPlanLubeDetailId(planLubeDetailId));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增润滑计划明细
|
||||
*/
|
||||
@RequiresPermissions("dms:dmsPlanLubeDetail:add")
|
||||
@Log(title = "润滑计划明细", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody DmsPlanLubeDetail dmsPlanLubeDetail)
|
||||
{
|
||||
return toAjax(dmsPlanLubeDetailService.insertDmsPlanLubeDetail(dmsPlanLubeDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改润滑计划明细
|
||||
*/
|
||||
@RequiresPermissions("dms:dmsPlanLubeDetail:edit")
|
||||
@Log(title = "润滑计划明细", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody DmsPlanLubeDetail dmsPlanLubeDetail)
|
||||
{
|
||||
return toAjax(dmsPlanLubeDetailService.updateDmsPlanLubeDetail(dmsPlanLubeDetail));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除润滑计划明细
|
||||
*/
|
||||
@RequiresPermissions("dms:dmsPlanLubeDetail:remove")
|
||||
@Log(title = "润滑计划明细", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{planLubeDetailIds}")
|
||||
public AjaxResult remove(@PathVariable Long[] planLubeDetailIds)
|
||||
{
|
||||
return toAjax(dmsPlanLubeDetailService.deleteDmsPlanLubeDetailByPlanLubeDetailIds(planLubeDetailIds));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 获取润滑标准列表
|
||||
*/
|
||||
@RequiresPermissions("dms:dmsPlanLubeDetail:query")
|
||||
@GetMapping(value = "/getLubeStations")
|
||||
public AjaxResult getLubeStations(DmsBaseLubeStation dmsBaseLubeStation)
|
||||
{
|
||||
return success(dmsBaseLubeStationService.selectDmsBaseLubeStationList(dmsBaseLubeStation));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取润滑部位列表
|
||||
*/
|
||||
@RequiresPermissions("dms:dmsPlanLubeDetail:query")
|
||||
@GetMapping(value = "/getLubeStandards")
|
||||
public AjaxResult getLubeStandards(DmsBaseLubeStandard dmsBaseLubeStandard)
|
||||
{
|
||||
return success(dmsBaseLubeStandardService.selectDmsBaseLubeStandardList(dmsBaseLubeStandard));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取设备列表
|
||||
*/
|
||||
@RequiresPermissions("dms:dmsPlanLubeDetail:query")
|
||||
@GetMapping(value = "/getBaseDeviceLedgers")
|
||||
public AjaxResult getBaseDeviceLedgers(DmsBaseDeviceLedger dmsBaseDeviceLedger)
|
||||
{
|
||||
return success(dmsBaseDeviceLedgerService.selectDmsBaseDeviceLedgerList(dmsBaseDeviceLedger));
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,75 @@
|
||||
package com.hw.dms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.dms.domain.DmsBillsLubeDetail;
|
||||
|
||||
/**
|
||||
* 润滑工单明细Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-03-20
|
||||
*/
|
||||
public interface DmsBillsLubeDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询润滑工单明细
|
||||
*
|
||||
* @param billsLubeDetailId 润滑工单明细主键
|
||||
* @return 润滑工单明细
|
||||
*/
|
||||
public DmsBillsLubeDetail selectDmsBillsLubeDetailByBillsLubeDetailId(Long billsLubeDetailId);
|
||||
|
||||
/**
|
||||
* 查询润滑工单明细列表
|
||||
*
|
||||
* @param dmsBillsLubeDetail 润滑工单明细
|
||||
* @return 润滑工单明细集合
|
||||
*/
|
||||
public List<DmsBillsLubeDetail> selectDmsBillsLubeDetailList(DmsBillsLubeDetail dmsBillsLubeDetail);
|
||||
|
||||
/**
|
||||
* 新增润滑工单明细
|
||||
*
|
||||
* @param dmsBillsLubeDetail 润滑工单明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDmsBillsLubeDetail(DmsBillsLubeDetail dmsBillsLubeDetail);
|
||||
|
||||
/**
|
||||
* 修改润滑工单明细
|
||||
*
|
||||
* @param dmsBillsLubeDetail 润滑工单明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDmsBillsLubeDetail(DmsBillsLubeDetail dmsBillsLubeDetail);
|
||||
|
||||
/**
|
||||
* 删除润滑工单明细
|
||||
*
|
||||
* @param billsLubeDetailId 润滑工单明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDmsBillsLubeDetailByBillsLubeDetailId(Long billsLubeDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除润滑工单明细
|
||||
*
|
||||
* @param billsLubeDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDmsBillsLubeDetailByBillsLubeDetailIds(Long[] billsLubeDetailIds);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询润滑工单明细列表,join device,devicetype,lube_station和lube_standard
|
||||
*
|
||||
* @param dmsBillsLubeDetail 润滑工单明细
|
||||
* @return 润滑工单明细集合
|
||||
*/
|
||||
public List<DmsBillsLubeDetail> selectDmsBillsLubeDetailJoinList(DmsBillsLubeDetail dmsBillsLubeDetail);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.hw.dms.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.dms.domain.DmsPlanLubeDetail;
|
||||
|
||||
/**
|
||||
* 润滑计划明细Mapper接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-03-21
|
||||
*/
|
||||
public interface DmsPlanLubeDetailMapper
|
||||
{
|
||||
/**
|
||||
* 查询润滑计划明细
|
||||
*
|
||||
* @param planLubeDetailId 润滑计划明细主键
|
||||
* @return 润滑计划明细
|
||||
*/
|
||||
public DmsPlanLubeDetail selectDmsPlanLubeDetailByPlanLubeDetailId(Long planLubeDetailId);
|
||||
|
||||
/**
|
||||
* 查询润滑计划明细列表
|
||||
*
|
||||
* @param dmsPlanLubeDetail 润滑计划明细
|
||||
* @return 润滑计划明细集合
|
||||
*/
|
||||
public List<DmsPlanLubeDetail> selectDmsPlanLubeDetailList(DmsPlanLubeDetail dmsPlanLubeDetail);
|
||||
|
||||
/**
|
||||
* 新增润滑计划明细
|
||||
*
|
||||
* @param dmsPlanLubeDetail 润滑计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDmsPlanLubeDetail(DmsPlanLubeDetail dmsPlanLubeDetail);
|
||||
|
||||
/**
|
||||
* 修改润滑计划明细
|
||||
*
|
||||
* @param dmsPlanLubeDetail 润滑计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDmsPlanLubeDetail(DmsPlanLubeDetail dmsPlanLubeDetail);
|
||||
|
||||
/**
|
||||
* 删除润滑计划明细
|
||||
*
|
||||
* @param planLubeDetailId 润滑计划明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDmsPlanLubeDetailByPlanLubeDetailId(Long planLubeDetailId);
|
||||
|
||||
/**
|
||||
* 批量删除润滑计划明细
|
||||
*
|
||||
* @param planLubeDetailIds 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDmsPlanLubeDetailByPlanLubeDetailIds(Long[] planLubeDetailIds);
|
||||
}
|
||||
@ -0,0 +1,61 @@
|
||||
package com.hw.dms.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.hw.dms.domain.DmsPlanLubeDetail;
|
||||
|
||||
/**
|
||||
* 润滑计划明细Service接口
|
||||
*
|
||||
* @author xins
|
||||
* @date 2024-03-21
|
||||
*/
|
||||
public interface IDmsPlanLubeDetailService
|
||||
{
|
||||
/**
|
||||
* 查询润滑计划明细
|
||||
*
|
||||
* @param planLubeDetailId 润滑计划明细主键
|
||||
* @return 润滑计划明细
|
||||
*/
|
||||
public DmsPlanLubeDetail selectDmsPlanLubeDetailByPlanLubeDetailId(Long planLubeDetailId);
|
||||
|
||||
/**
|
||||
* 查询润滑计划明细列表
|
||||
*
|
||||
* @param dmsPlanLubeDetail 润滑计划明细
|
||||
* @return 润滑计划明细集合
|
||||
*/
|
||||
public List<DmsPlanLubeDetail> selectDmsPlanLubeDetailList(DmsPlanLubeDetail dmsPlanLubeDetail);
|
||||
|
||||
/**
|
||||
* 新增润滑计划明细
|
||||
*
|
||||
* @param dmsPlanLubeDetail 润滑计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertDmsPlanLubeDetail(DmsPlanLubeDetail dmsPlanLubeDetail);
|
||||
|
||||
/**
|
||||
* 修改润滑计划明细
|
||||
*
|
||||
* @param dmsPlanLubeDetail 润滑计划明细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateDmsPlanLubeDetail(DmsPlanLubeDetail dmsPlanLubeDetail);
|
||||
|
||||
/**
|
||||
* 批量删除润滑计划明细
|
||||
*
|
||||
* @param planLubeDetailIds 需要删除的润滑计划明细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDmsPlanLubeDetailByPlanLubeDetailIds(Long[] planLubeDetailIds);
|
||||
|
||||
/**
|
||||
* 删除润滑计划明细信息
|
||||
*
|
||||
* @param planLubeDetailId 润滑计划明细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteDmsPlanLubeDetailByPlanLubeDetailId(Long planLubeDetailId);
|
||||
}
|
||||
@ -0,0 +1,155 @@
|
||||
<?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.hw.dms.mapper.DmsBillsLubeDetailMapper">
|
||||
|
||||
<resultMap type="DmsBillsLubeDetail" id="DmsBillsLubeDetailResult">
|
||||
<result property="billsLubeDetailId" column="bills_lube_detail_id" />
|
||||
<result property="lubeInstanceId" column="lube_instance_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="lubeStationId" column="lube_station_id" />
|
||||
<result property="lubeStandardId" column="lube_standard_id" />
|
||||
<result property="operationDescription" column="operation_description" />
|
||||
<result property="maintStatus" column="maint_status" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="beginTime" column="begin_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
|
||||
<result property="deviceCode" column="device_code" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="lubeStationName" column="lube_station_name" />
|
||||
<result property="lubeProtocol" column="lube_protocol" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectDmsBillsLubeDetailVo">
|
||||
select bills_lube_detail_id, lube_instance_id, device_id, lube_station_id, lube_standard_id, operation_description, maint_status, is_flag, remark, create_by, create_time, update_by, update_time from dms_bills_lube_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectDmsBillsLubeDetailList" parameterType="DmsBillsLubeDetail" resultMap="DmsBillsLubeDetailResult">
|
||||
<include refid="selectDmsBillsLubeDetailVo"/>
|
||||
<where>
|
||||
<if test="lubeInstanceId != null "> and lube_instance_id = #{lubeInstanceId}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="lubeStationId != null "> and lube_station_id = #{lubeStationId}</if>
|
||||
<if test="lubeStandardId != null "> and lube_standard_id = #{lubeStandardId}</if>
|
||||
<if test="operationDescription != null and operationDescription != ''"> and operation_description = #{operationDescription}</if>
|
||||
<if test="maintStatus != null "> and maint_status = #{maintStatus}</if>
|
||||
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDmsBillsLubeDetailByBillsLubeDetailId" parameterType="Long" resultMap="DmsBillsLubeDetailResult">
|
||||
<include refid="selectDmsBillsLubeDetailVo"/>
|
||||
where bills_lube_detail_id = #{billsLubeDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDmsBillsLubeDetail" parameterType="DmsBillsLubeDetail" useGeneratedKeys="true" keyProperty="billsLubeDetailId">
|
||||
insert into dms_bills_lube_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="lubeInstanceId != null">lube_instance_id,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="lubeStationId != null">lube_station_id,</if>
|
||||
<if test="lubeStandardId != null">lube_standard_id,</if>
|
||||
<if test="operationDescription != null">operation_description,</if>
|
||||
<if test="maintStatus != null">maint_status,</if>
|
||||
<if test="isFlag != null">is_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="beginTime != null">begin_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="lubeInstanceId != null">#{lubeInstanceId},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="lubeStationId != null">#{lubeStationId},</if>
|
||||
<if test="lubeStandardId != null">#{lubeStandardId},</if>
|
||||
<if test="operationDescription != null">#{operationDescription},</if>
|
||||
<if test="maintStatus != null">#{maintStatus},</if>
|
||||
<if test="isFlag != null">#{isFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="beginTime != null">#{beginTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDmsBillsLubeDetail" parameterType="DmsBillsLubeDetail">
|
||||
update dms_bills_lube_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="lubeInstanceId != null">lube_instance_id = #{lubeInstanceId},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="lubeStationId != null">lube_station_id = #{lubeStationId},</if>
|
||||
<if test="lubeStandardId != null">lube_standard_id = #{lubeStandardId},</if>
|
||||
<if test="operationDescription != null">operation_description = #{operationDescription},</if>
|
||||
<if test="maintStatus != null">maint_status = #{maintStatus},</if>
|
||||
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="beginTime != null">begin_time = #{beginTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
</trim>
|
||||
where bills_lube_detail_id = #{billsLubeDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDmsBillsLubeDetailByBillsLubeDetailId" parameterType="Long">
|
||||
delete from dms_bills_lube_detail where bills_lube_detail_id = #{billsLubeDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDmsBillsLubeDetailByBillsLubeDetailIds" parameterType="String">
|
||||
delete from dms_bills_lube_detail where bills_lube_detail_id in
|
||||
<foreach item="billsLubeDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{billsLubeDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<sql id="selectDmsBillsLubeDetailJoinVo">
|
||||
select dbld.bills_lube_detail_id, dbld.lube_instance_id, dbld.device_id, dbld.lube_station_id, dbld.lube_standard_id,
|
||||
dbld.operation_description, dbld.maint_status, dbld.create_by, dbld.create_time,
|
||||
dbdl.device_code,dbdl.device_name,
|
||||
dbdt.type_name,
|
||||
dbls.protocol_code,
|
||||
dblsd.lube_protocol,dblsd.operation_description as lube_operation_description
|
||||
from dms_bills_lube_detail dbld
|
||||
left join dms_base_device_ledger dbdl on dbld.device_id = dbdl.device_id
|
||||
left join dms_base_device_type dbdt on dbdl.device_type_id=dbdt.device_type_id
|
||||
left join dms_base_lube_station dbls on dbld.lube_station_id=dbls.lube_station_id
|
||||
left join dms_base_lube_standard dblsd on dbld.lube_standard_id=dblsd.lube_standard_id
|
||||
|
||||
</sql>
|
||||
|
||||
<select id="selectDmsBillsLubeDetailJoinList" parameterType="DmsBillsLubeDetail" resultMap="DmsBillsLubeDetailResult">
|
||||
<include refid="selectDmsBillsLubeDetailJoinVo"/>
|
||||
<where>
|
||||
<if test="lubeInstanceId != null "> and dbld.lube_instance_id = #{lubeInstanceId}</if>
|
||||
<if test="deviceId != null "> and dbld.device_id = #{deviceId}</if>
|
||||
<if test="lubeStationId != null "> and dbld.lube_station_id = #{lubeStationId}</if>
|
||||
<if test="lubeStandardId != null "> and dbld.lube_standard_id = #{lubeStandardId}</if>
|
||||
<if test="operationDescription != null and operationDescription != ''"> and dbld.operation_description = #{operationDescription}</if>
|
||||
<if test="maintStatus != null "> and dbld.maint_status = #{maintStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@ -0,0 +1,152 @@
|
||||
<?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.hw.dms.mapper.DmsBillsMaintDetailMapper">
|
||||
|
||||
<resultMap type="DmsBillsMaintDetail" id="DmsBillsMaintDetailResult">
|
||||
<result property="billsMaintDetailId" column="bills_maint_detail_id" />
|
||||
<result property="maintInstanceId" column="maint_instance_id" />
|
||||
<result property="deviceId" column="device_id" />
|
||||
<result property="stationId" column="station_id" />
|
||||
<result property="maintStandardId" column="maint_standard_id" />
|
||||
<result property="operationDescription" column="operation_description" />
|
||||
<result property="maintStatus" column="maint_status" />
|
||||
<result property="isFlag" column="is_flag" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="beginTime" column="begin_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
|
||||
<result property="deviceCode" column="device_code" />
|
||||
<result property="deviceName" column="device_name" />
|
||||
<result property="typeName" column="type_name" />
|
||||
<result property="maintStationName" column="maint_station_name" />
|
||||
<result property="maintProtocol" column="maint_protocol" />
|
||||
<result property="maintOperationDescription" column="maint_operation_description" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
|
||||
<sql id="selectDmsBillsMaintDetailVo">
|
||||
select bills_maint_detail_id, maint_instance_id, device_id, station_id, maint_standard_id, operation_description, maint_status, is_flag, remark, create_by, create_time, update_by, update_time from dms_bills_maint_detail
|
||||
</sql>
|
||||
|
||||
<select id="selectDmsBillsMaintDetailList" parameterType="DmsBillsMaintDetail" resultMap="DmsBillsMaintDetailResult">
|
||||
<include refid="selectDmsBillsMaintDetailVo"/>
|
||||
<where>
|
||||
<if test="maintInstanceId != null "> and maint_instance_id = #{maintInstanceId}</if>
|
||||
<if test="deviceId != null "> and device_id = #{deviceId}</if>
|
||||
<if test="stationId != null "> and station_id = #{stationId}</if>
|
||||
<if test="maintStandardId != null "> and maint_standard_id = #{maintStandardId}</if>
|
||||
<if test="operationDescription != null and operationDescription != ''"> and operation_description = #{operationDescription}</if>
|
||||
<if test="maintStatus != null "> and maint_status = #{maintStatus}</if>
|
||||
<if test="isFlag != null "> and is_flag = #{isFlag}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectDmsBillsMaintDetailByBillsMaintDetailId" parameterType="Long" resultMap="DmsBillsMaintDetailResult">
|
||||
<include refid="selectDmsBillsMaintDetailVo"/>
|
||||
where bills_maint_detail_id = #{billsMaintDetailId}
|
||||
</select>
|
||||
|
||||
<insert id="insertDmsBillsMaintDetail" parameterType="DmsBillsMaintDetail" useGeneratedKeys="true" keyProperty="billsMaintDetailId">
|
||||
insert into dms_bills_maint_detail
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="maintInstanceId != null">maint_instance_id,</if>
|
||||
<if test="deviceId != null">device_id,</if>
|
||||
<if test="stationId != null">station_id,</if>
|
||||
<if test="maintStandardId != null">maint_standard_id,</if>
|
||||
<if test="operationDescription != null">operation_description,</if>
|
||||
<if test="maintStatus != null">maint_status,</if>
|
||||
<if test="isFlag != null">is_flag,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="beginTime != null">begin_time,</if>
|
||||
<if test="endTime != null">end_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="maintInstanceId != null">#{maintInstanceId},</if>
|
||||
<if test="deviceId != null">#{deviceId},</if>
|
||||
<if test="stationId != null">#{stationId},</if>
|
||||
<if test="maintStandardId != null">#{maintStandardId},</if>
|
||||
<if test="operationDescription != null">#{operationDescription},</if>
|
||||
<if test="maintStatus != null">#{maintStatus},</if>
|
||||
<if test="isFlag != null">#{isFlag},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="beginTime != null">#{beginTime},</if>
|
||||
<if test="endTime != null">#{endTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateDmsBillsMaintDetail" parameterType="DmsBillsMaintDetail">
|
||||
update dms_bills_maint_detail
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="maintInstanceId != null">maint_instance_id = #{maintInstanceId},</if>
|
||||
<if test="deviceId != null">device_id = #{deviceId},</if>
|
||||
<if test="stationId != null">station_id = #{stationId},</if>
|
||||
<if test="maintStandardId != null">maint_standard_id = #{maintStandardId},</if>
|
||||
<if test="operationDescription != null">operation_description = #{operationDescription},</if>
|
||||
<if test="maintStatus != null">maint_status = #{maintStatus},</if>
|
||||
<if test="isFlag != null">is_flag = #{isFlag},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="beginTime != null">begin_time = #{beginTime},</if>
|
||||
<if test="endTime != null">end_time = #{endTime},</if>
|
||||
</trim>
|
||||
where bills_maint_detail_id = #{billsMaintDetailId}
|
||||
</update>
|
||||
|
||||
<delete id="deleteDmsBillsMaintDetailByBillsMaintDetailId" parameterType="Long">
|
||||
delete from dms_bills_maint_detail where bills_maint_detail_id = #{billsMaintDetailId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDmsBillsMaintDetailByBillsMaintDetailIds" parameterType="String">
|
||||
delete from dms_bills_maint_detail where bills_maint_detail_id in
|
||||
<foreach item="billsMaintDetailId" collection="array" open="(" separator="," close=")">
|
||||
#{billsMaintDetailId}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
|
||||
|
||||
|
||||
<sql id="selectDmsBillsMaintDetailJoinVo">
|
||||
select dbmd.bills_maint_detail_id, dbmd.maint_instance_id, dbmd.device_id, dbmd.station_id, dbmd.maint_standard_id,
|
||||
dbmd.operation_description, dbmd.maint_status,
|
||||
dbdl.device_code,dbdl.device_name,
|
||||
dbdt.type_name,
|
||||
dbms.maint_station_name,
|
||||
dbmsd.maint_protocol,dbmsd.operation_description as maint_operation_description
|
||||
from dms_bills_maint_detail dbmd
|
||||
left join dms_base_device_ledger dbdl on dbmd.device_id=dbdl.device_id
|
||||
left join dms_base_device_type dbdt on dbdl.device_type_id=dbdt.device_type_id
|
||||
left join dms_base_maint_station dbms on dbmd.station_id = dbms.maint_station_id
|
||||
left join dms_base_maint_standard dbmsd on dbmd.maint_standard_id = dbmsd.maint_standard_id
|
||||
</sql>
|
||||
|
||||
<select id="selectDmsBillsMaintDetailJoinList" parameterType="DmsBillsMaintDetail" resultMap="DmsBillsMaintDetailResult">
|
||||
<include refid="selectDmsBillsMaintDetailJoinVo"/>
|
||||
<where>
|
||||
<if test="maintInstanceId != null "> and dbmd.maint_instance_id = #{maintInstanceId}</if>
|
||||
<if test="deviceId != null "> and dbmd.device_id = #{deviceId}</if>
|
||||
<if test="stationId != null "> and dbmd.station_id = #{stationId}</if>
|
||||
<if test="maintStandardId != null "> and dbmd.maint_standard_id = #{maintStandardId}</if>
|
||||
<if test="maintStatus != null "> and dbmd.maint_status = #{maintStatus}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue