综合查询-装备信息
This commit is contained in:
parent
398e076594
commit
1f7b974e3f
|
|
@ -0,0 +1,35 @@
|
|||
package com.bonus.material.comprehensive.controller;
|
||||
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.device.domain.DevInfo;
|
||||
import com.bonus.material.device.domain.vo.DevInfoVo;
|
||||
import com.bonus.material.device.service.DevInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:liang.chao
|
||||
* @Date:2024/12/18 - 11:14
|
||||
* 综合查询
|
||||
*/
|
||||
@Api(tags = "综合查询")
|
||||
@RestController
|
||||
@RequestMapping("/comprehensive")
|
||||
public class ComprehensiveController extends BaseController {
|
||||
@Resource
|
||||
private DevInfoService devInfoService;
|
||||
@ApiOperation(value = "综合查询-装备信息")
|
||||
@GetMapping("/devList")
|
||||
public AjaxResult getDevList(DevInfo devInfo) {
|
||||
startPage();
|
||||
List<DevInfoVo> list = devInfoService.getDevList(devInfo);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
}
|
||||
|
|
@ -187,5 +187,7 @@ public interface DevInfoMapper {
|
|||
List<DevInfoVo> selectAssociationList(DevInfoVo devInfo);
|
||||
|
||||
List<DevInfoVo> getTagDevList(DevInfoVo devInfoVo);
|
||||
|
||||
List<DevInfoVo> getDevList(DevInfo devInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.device.service;
|
|||
|
||||
import com.bonus.common.biz.domain.BmCompanyInfo;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.basic.domain.BmCompanyAddress;
|
||||
import com.bonus.material.device.domain.DevInfo;
|
||||
import com.bonus.material.device.domain.dto.DevInfoImpDto;
|
||||
import com.bonus.material.device.domain.dto.InfoMotionDto;
|
||||
|
|
@ -109,4 +110,6 @@ public interface DevInfoService {
|
|||
List<DevInfoVo> selectAssociationList(DevInfoVo devInfo);
|
||||
|
||||
List<DevInfoVo> getTagDevList(DevInfoVo devInfoVo);
|
||||
|
||||
List<DevInfoVo> getDevList(DevInfo devInfo);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -759,6 +759,11 @@ public class DevInfoServiceImpl implements DevInfoService {
|
|||
return devInfoMapper.getTagDevList(devInfoVo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DevInfoVo> getDevList(DevInfo devInfo) {
|
||||
return devInfoMapper.getDevList(devInfo);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertOutType(String devInfo) {
|
||||
ObjectMapper objectMapper = new ObjectMapper();
|
||||
|
|
|
|||
|
|
@ -795,5 +795,65 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and DATE_FORMAT(d.create_time,'%Y-%m-%d') between #{startTime} and #{endTime}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getDevList" resultType="com.bonus.material.device.domain.vo.DevInfoVo">
|
||||
SELECT
|
||||
d.ma_id AS maId,
|
||||
d.CODE AS code,
|
||||
d.identify_code AS identifyCode,
|
||||
d.device_name AS deviceName,
|
||||
d.device_weight AS deviceWeight,
|
||||
d.device_count AS deviceCount,
|
||||
d.type_id AS typeId,
|
||||
mt4.type_name AS typeName,
|
||||
mt4.unit_name AS unitName,
|
||||
d.ma_status AS maStatus,
|
||||
d.brand AS brand,
|
||||
d.model_name AS modelName,
|
||||
d.production_date AS productionDate,
|
||||
d.working_hours AS workingHours,
|
||||
d.serial_number AS serialNumber,
|
||||
mt4.lease_price AS dayLeasePrice,
|
||||
d.person AS person,
|
||||
d.person_phone AS personPhone,
|
||||
d.create_time AS createTime,
|
||||
d.update_time AS updateTime,
|
||||
d.own_co AS companyId,
|
||||
sd.dept_name AS companyName,
|
||||
c.operate_address AS operateAddress,
|
||||
mt3.type_id AS thirdId,
|
||||
mt3.type_name AS thirdName,
|
||||
mt2.type_id AS secondId,
|
||||
mt2.type_name AS secondName,
|
||||
mt1.type_id AS firstId,
|
||||
mt1.type_name AS firstName
|
||||
FROM
|
||||
ma_dev_info d
|
||||
LEFT JOIN sys_dept sd ON d.own_co = sd.dept_id
|
||||
LEFT JOIN bm_company_info c ON sd.dept_id = c.company_id
|
||||
LEFT JOIN ma_type mt4 ON mt4.type_id = d.type_id
|
||||
AND mt4.del_flag = '0'
|
||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt4.parent_id
|
||||
AND mt3.del_flag = '0'
|
||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt3.parent_id
|
||||
AND mt2.del_flag = '0'
|
||||
LEFT JOIN ma_type mt1 ON mt1.type_id = mt2.parent_id
|
||||
AND mt1.del_flag = '0'
|
||||
WHERE
|
||||
d.is_active = '1'
|
||||
<if test="deviceName != null and deviceName != ''">
|
||||
AND d.device_name like concat('%',#{deviceName},'%')
|
||||
</if>
|
||||
<if test="code != null and code != ''">
|
||||
AND d.code like concat('%',#{code},'%')
|
||||
</if>
|
||||
<if test="typeId != null">
|
||||
AND d.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="startTime != null and endTime != null">
|
||||
AND d.update_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
ORDER BY
|
||||
d.create_time DESC
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue