Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
3b71cf3542
|
|
@ -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));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.contract.service;
|
||||||
import com.bonus.material.contract.domain.BmContract;
|
import com.bonus.material.contract.domain.BmContract;
|
||||||
import com.bonus.material.device.domain.vo.DevInfoVo;
|
import com.bonus.material.device.domain.vo.DevInfoVo;
|
||||||
|
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -13,9 +14,9 @@ public interface BmContractService {
|
||||||
|
|
||||||
List<BmContract> list(BmContract bmContract);
|
List<BmContract> list(BmContract bmContract);
|
||||||
|
|
||||||
Integer add(BmContract bmContract);
|
Integer add(BmContract bmContract) throws UnsupportedEncodingException;
|
||||||
|
|
||||||
Integer edit(BmContract bmContract);
|
Integer edit(BmContract bmContract) throws UnsupportedEncodingException;
|
||||||
|
|
||||||
Integer del(BmContract bmContract);
|
Integer del(BmContract bmContract);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,9 @@ import com.bonus.material.device.mapper.BmFileInfoMapper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.io.UnsupportedEncodingException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -42,7 +45,7 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer add(BmContract bmContract) {
|
public Integer add(BmContract bmContract) throws UnsupportedEncodingException {
|
||||||
bmContract.setContractCode(getString());
|
bmContract.setContractCode(getString());
|
||||||
bmContract.setOwnerId(SecurityUtils.getLoginUser().getUserid());
|
bmContract.setOwnerId(SecurityUtils.getLoginUser().getUserid());
|
||||||
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||||
|
|
@ -55,6 +58,7 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
bmFileInfo.setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT);
|
bmFileInfo.setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT);
|
||||||
// 合同照片附件
|
// 合同照片附件
|
||||||
bmFileInfo.setFileType(0L);
|
bmFileInfo.setFileType(0L);
|
||||||
|
bmFileInfo.setFileName(URLEncoder.encode(bmFileInfo.getFileName(), StandardCharsets.UTF_8.toString()));
|
||||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||||
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||||
}
|
}
|
||||||
|
|
@ -64,7 +68,7 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer edit(BmContract bmContract) {
|
public Integer edit(BmContract bmContract) throws UnsupportedEncodingException {
|
||||||
bmContract.setOwnerId(SecurityUtils.getLoginUser().getUserid());
|
bmContract.setOwnerId(SecurityUtils.getLoginUser().getUserid());
|
||||||
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
bmContract.setOwnerCom(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||||
Integer edit = bmContractMapper.edit(bmContract);
|
Integer edit = bmContractMapper.edit(bmContract);
|
||||||
|
|
@ -78,6 +82,7 @@ public class BmContractServiceImpl implements BmContractService {
|
||||||
bmFileInfo.setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT);
|
bmFileInfo.setTaskType(MaterialConstants.APPENDICES_OF_CONTRACT);
|
||||||
// 合同照片附件
|
// 合同照片附件
|
||||||
bmFileInfo.setFileType(0L);
|
bmFileInfo.setFileType(0L);
|
||||||
|
bmFileInfo.setFileName(URLEncoder.encode(bmFileInfo.getFileName(), StandardCharsets.UTF_8.toString()));
|
||||||
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
bmFileInfo.setCreateBy(SecurityUtils.getLoginUser().getUserid().toString());
|
||||||
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
bmFileInfoMapper.insertBmFileInfo(bmFileInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -187,5 +187,7 @@ public interface DevInfoMapper {
|
||||||
List<DevInfoVo> selectAssociationList(DevInfoVo devInfo);
|
List<DevInfoVo> selectAssociationList(DevInfoVo devInfo);
|
||||||
|
|
||||||
List<DevInfoVo> getTagDevList(DevInfoVo devInfoVo);
|
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.biz.domain.BmCompanyInfo;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
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.DevInfo;
|
||||||
import com.bonus.material.device.domain.dto.DevInfoImpDto;
|
import com.bonus.material.device.domain.dto.DevInfoImpDto;
|
||||||
import com.bonus.material.device.domain.dto.InfoMotionDto;
|
import com.bonus.material.device.domain.dto.InfoMotionDto;
|
||||||
|
|
@ -109,4 +110,6 @@ public interface DevInfoService {
|
||||||
List<DevInfoVo> selectAssociationList(DevInfoVo devInfo);
|
List<DevInfoVo> selectAssociationList(DevInfoVo devInfo);
|
||||||
|
|
||||||
List<DevInfoVo> getTagDevList(DevInfoVo devInfoVo);
|
List<DevInfoVo> getTagDevList(DevInfoVo devInfoVo);
|
||||||
|
|
||||||
|
List<DevInfoVo> getDevList(DevInfo devInfo);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -759,6 +759,11 @@ public class DevInfoServiceImpl implements DevInfoService {
|
||||||
return devInfoMapper.getTagDevList(devInfoVo);
|
return devInfoMapper.getTagDevList(devInfoVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<DevInfoVo> getDevList(DevInfo devInfo) {
|
||||||
|
return devInfoMapper.getDevList(devInfo);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void insertOutType(String devInfo) {
|
public void insertOutType(String devInfo) {
|
||||||
ObjectMapper objectMapper = new ObjectMapper();
|
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}
|
and DATE_FORMAT(d.create_time,'%Y-%m-%d') between #{startTime} and #{endTime}
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</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 startTime != '' and endTime != null and endTime != ''">
|
||||||
|
AND d.update_time between #{startTime} and #{endTime}
|
||||||
|
</if>
|
||||||
|
ORDER BY
|
||||||
|
d.create_time DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue