Compare commits
No commits in common. "eb09e27ab5b148425fa5ca30373a193a49a7c2c2" and "baef8909bfc393fd377c8205d298a6a32f487c8c" have entirely different histories.
eb09e27ab5
...
baef8909bf
|
|
@ -101,10 +101,6 @@ public class HttpStatus
|
||||||
*iot设备定位地址
|
*iot设备定位地址
|
||||||
*/
|
*/
|
||||||
public static final String LAST_POSITION_URL = "http://gps51.com/webapi?action=lastposition&token=";
|
public static final String LAST_POSITION_URL = "http://gps51.com/webapi?action=lastposition&token=";
|
||||||
/**
|
|
||||||
*iot设备获取地址
|
|
||||||
*/
|
|
||||||
public static final String REPORT_OF_FLINE = "http://gps51.com/webapi?action=reportoffline&token=";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*iot查询行程地址
|
*iot查询行程地址
|
||||||
|
|
|
||||||
|
|
@ -147,8 +147,6 @@ public class BmProjectLot {
|
||||||
private String latitude;
|
private String latitude;
|
||||||
@ApiModelProperty(value = "地址")
|
@ApiModelProperty(value = "地址")
|
||||||
private String address;
|
private String address;
|
||||||
@ApiModelProperty(value = "省份")
|
|
||||||
private String province;
|
|
||||||
|
|
||||||
/** 导出选中列表 */
|
/** 导出选中列表 */
|
||||||
private List<Long> dataCondition;
|
private List<Long> dataCondition;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,6 @@ import com.bonus.sgzb.common.log.annotation.Log;
|
||||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||||
import com.bonus.sgzb.largeScreen.domain.*;
|
import com.bonus.sgzb.largeScreen.domain.*;
|
||||||
import com.bonus.sgzb.largeScreen.service.ILargeScreenService;
|
import com.bonus.sgzb.largeScreen.service.ILargeScreenService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
@ -69,16 +68,11 @@ public class LargeScreenController extends BaseController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Log(title = "获取省份信息",businessType = BusinessType.QUERY)
|
@Log(title = "设备分布图",businessType = BusinessType.QUERY)
|
||||||
@GetMapping("getEquipmentDisByMap")
|
@PostMapping("getEquipmentDisByMap")
|
||||||
public AjaxResult getEquipmentDisByMap(ParamsDto dto) {
|
public AjaxResult getEquipmentDisByMap(ParamsDto dto) {
|
||||||
return service.getEquipmentDisByMap(dto);
|
return service.getEquipmentDisByMap(dto);
|
||||||
}
|
}
|
||||||
@Log(title = "获取工程经纬度、地址",businessType = BusinessType.QUERY)
|
|
||||||
@GetMapping("getEquipmentDis")
|
|
||||||
public AjaxResult getEquipmentDis(ParamsDto dto) {
|
|
||||||
return service.getEquipmentDis(dto);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Log(title = "施工机具/安全工器具总保有量",businessType = BusinessType.QUERY)
|
@Log(title = "施工机具/安全工器具总保有量",businessType = BusinessType.QUERY)
|
||||||
@PostMapping("getTotalOwnership")
|
@PostMapping("getTotalOwnership")
|
||||||
|
|
@ -239,40 +233,8 @@ public class LargeScreenController extends BaseController {
|
||||||
|
|
||||||
@Log(title = "获取iot编码绑定设备", businessType = BusinessType.QUERY)
|
@Log(title = "获取iot编码绑定设备", businessType = BusinessType.QUERY)
|
||||||
@GetMapping("getIotMaCodeMachine")
|
@GetMapping("getIotMaCodeMachine")
|
||||||
public AjaxResult getIotMaCodeMachine(String province) {
|
public AjaxResult getIotMaCodeMachine() {
|
||||||
List<IotMaCodeMachine> iotMaCodeMachine = service.getIotMaCodeMachine(province);
|
List<IotMaCodeMachine> iotMaCodeMachine = service.getIotMaCodeMachine();
|
||||||
return AjaxResult.success(iotMaCodeMachine);
|
return AjaxResult.success(iotMaCodeMachine);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 领料记录列表
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "大屏二级页面--领料记录列表")
|
|
||||||
@GetMapping("/getLeaseRecordListByLotId")
|
|
||||||
public AjaxResult getLeaseRecordListByLotId(LeaseRecord leaseRecord) {
|
|
||||||
startPage();
|
|
||||||
List<LeaseRecord> list = service.getLeaseRecordList(leaseRecord);
|
|
||||||
return AjaxResult.success(getDataTable(list));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 领料记录列表
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "大屏二级页面--退料记录列表")
|
|
||||||
@GetMapping("/getBackRecordListByLotId")
|
|
||||||
public AjaxResult getBackRecordListByLotId(BackRecord backRecord) {
|
|
||||||
startPage();
|
|
||||||
List<BackRecord> list = service.getBackRecordListByLotId(backRecord);
|
|
||||||
return AjaxResult.success(getDataTable(list));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 领料记录列表
|
|
||||||
*/
|
|
||||||
@ApiOperation(value = "大屏二级页面--查询工程在用设备数量")
|
|
||||||
@GetMapping("/getUseNumByLotId")
|
|
||||||
public AjaxResult getUseNumByLotId(LeaseRecord leaseRecord) {
|
|
||||||
LeaseRecord leaseRecords = service.getUseNumByLotId(leaseRecord);
|
|
||||||
return AjaxResult.success(leaseRecords);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,185 +0,0 @@
|
||||||
package com.bonus.sgzb.largeScreen.domain;
|
|
||||||
|
|
||||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @description 综合查询--退料查询
|
|
||||||
* @author hay
|
|
||||||
* @date 2024/2/26 14:51
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class BackRecord {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 2227217051604273598L;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类型名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "类型名称")
|
|
||||||
@Excel(name = "机具名称")
|
|
||||||
private String typeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规格ID
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "规格ID")
|
|
||||||
private Integer typeId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规格型号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "规格型号")
|
|
||||||
@Excel(name = "机具规格")
|
|
||||||
private String typeModelName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退料单号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "退料单号")
|
|
||||||
@Excel(name = "退料单号")
|
|
||||||
private String code;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 协议号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "协议号")
|
|
||||||
private String agreementCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备编码
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "设备编码")
|
|
||||||
@Excel(name = "设备编码")
|
|
||||||
private String maCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计量单位
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "计量单位")
|
|
||||||
private String unit;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退料数量
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "退料数量")
|
|
||||||
@Excel(name = "退料数量",cellType = Excel.ColumnType.NUMERIC)
|
|
||||||
private Double backNum;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退料人
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "退料人")
|
|
||||||
@Excel(name = "退料人")
|
|
||||||
private String backPerson;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建者
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "创建者")
|
|
||||||
private String createBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
|
||||||
@DateTimeFormat(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 createTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新者
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "更新者")
|
|
||||||
private String updateBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "更新时间 ")
|
|
||||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退料单位Id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "退料单位Id")
|
|
||||||
private Integer unitId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退料单位
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "退料单位")
|
|
||||||
@Excel(name = "退料单位")
|
|
||||||
private String unitName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退料工程Id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "退料工程Id")
|
|
||||||
private Integer lotId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 退料工程
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "退料工程")
|
|
||||||
@Excel(name = "退料工程")
|
|
||||||
private String proName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "关键字")
|
|
||||||
private String keyWord;
|
|
||||||
|
|
||||||
@ApiModelProperty(value="开始时间")
|
|
||||||
private String startTime;
|
|
||||||
|
|
||||||
@ApiModelProperty(value="结束时间")
|
|
||||||
private String endTime;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备所属类型
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "数据所属组织")
|
|
||||||
private Integer companyId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 装备管理方式(0编号 1计数)
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "装备管理方式")
|
|
||||||
private int manageType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 装备管理方式(0编号 1计数)
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "装备管理方式名称")
|
|
||||||
private String manageTypeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 实时库存
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "实时库存")
|
|
||||||
private Double num;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
||||||
package com.bonus.sgzb.largeScreen.domain;
|
|
||||||
|
|
||||||
import lombok.Data;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author 10488
|
|
||||||
* 设备分布-VO
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class EquipmentDis {
|
|
||||||
/**
|
|
||||||
* 省份
|
|
||||||
*/
|
|
||||||
private String province;
|
|
||||||
/**
|
|
||||||
* 工程数量
|
|
||||||
*/
|
|
||||||
private Integer num;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -2,8 +2,6 @@ package com.bonus.sgzb.largeScreen.domain;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author 10488
|
* @author 10488
|
||||||
* 设备分布-VO
|
* 设备分布-VO
|
||||||
|
|
@ -11,41 +9,15 @@ import java.util.List;
|
||||||
@Data
|
@Data
|
||||||
public class EquipmentDisVo {
|
public class EquipmentDisVo {
|
||||||
|
|
||||||
/**
|
/** 经度*/
|
||||||
* 经度
|
|
||||||
*/
|
|
||||||
private String lon;
|
private String lon;
|
||||||
|
|
||||||
/**
|
/** 维度*/
|
||||||
* 维度
|
|
||||||
*/
|
|
||||||
private String lat;
|
private String lat;
|
||||||
|
|
||||||
/**
|
/** 工程名称*/
|
||||||
* 工程名称
|
|
||||||
*/
|
|
||||||
private String lotName;
|
private String lotName;
|
||||||
/**
|
|
||||||
* 工程id
|
|
||||||
*/
|
|
||||||
private Integer lotId;
|
|
||||||
|
|
||||||
/**
|
/** 机具类型名称*/
|
||||||
* 机具类型名称
|
|
||||||
*/
|
|
||||||
private String typeName;
|
private String typeName;
|
||||||
/**
|
|
||||||
* 省份
|
|
||||||
*/
|
|
||||||
private String province;
|
|
||||||
/**
|
|
||||||
* 工程数量
|
|
||||||
*/
|
|
||||||
private Integer num;
|
|
||||||
|
|
||||||
private String longitude;
|
|
||||||
private String latitude;
|
|
||||||
private String address;
|
|
||||||
|
|
||||||
List<EquipmentDisVo> EquipmentDisList;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -45,17 +45,8 @@ public class IotMaCodeMachine {
|
||||||
* 绑定状态
|
* 绑定状态
|
||||||
*/
|
*/
|
||||||
private String bindStatus;
|
private String bindStatus;
|
||||||
/**
|
|
||||||
* 省份
|
|
||||||
*/
|
|
||||||
private String province;
|
|
||||||
/**
|
|
||||||
* 协议id
|
|
||||||
*/
|
|
||||||
private String agreementId;
|
|
||||||
/**
|
/**
|
||||||
* 当前位置
|
* 当前位置
|
||||||
*/
|
*/
|
||||||
private IotLocationVo iotLocationVo;
|
private IotLocationVo iotLocationVo;
|
||||||
private IotLocationVo iotLocationVo1;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,205 +0,0 @@
|
||||||
package com.bonus.sgzb.largeScreen.domain;
|
|
||||||
|
|
||||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
|
||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
|
||||||
import io.swagger.annotations.ApiModel;
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
import lombok.Data;
|
|
||||||
import org.springframework.format.annotation.DateTimeFormat;
|
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author hay
|
|
||||||
* @date 2024/2/26 14:51
|
|
||||||
*/
|
|
||||||
@Data
|
|
||||||
public class LeaseRecord {
|
|
||||||
|
|
||||||
private static final long serialVersionUID = 2227217051604273598L;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "")
|
|
||||||
private Integer id;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 类型名称
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "类型名称")
|
|
||||||
@Excel(name = "机具名称")
|
|
||||||
private String typeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规格ID
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "规格ID")
|
|
||||||
private Integer typeId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 规格型号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "规格型号")
|
|
||||||
@Excel(name = "机具规格")
|
|
||||||
private String typeModelName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 协议号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "协议号")
|
|
||||||
@Excel(name = "协议号")
|
|
||||||
private String agreementCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备编码
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "设备编码")
|
|
||||||
@Excel(name = "设备编码")
|
|
||||||
private String maCode;
|
|
||||||
/**
|
|
||||||
* 领料单号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "领料单号")
|
|
||||||
@Excel(name = "领料单号")
|
|
||||||
private String code;
|
|
||||||
/**
|
|
||||||
* 车牌号
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "车牌号")
|
|
||||||
@Excel(name = "车牌号")
|
|
||||||
private String carCode;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 计量单位
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "计量单位")
|
|
||||||
@Excel(name = "单位")
|
|
||||||
private String unit;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 预领料数
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "预领料数")
|
|
||||||
@Excel(name = "领料数量", cellType = Excel.ColumnType.NUMERIC)
|
|
||||||
private Double preNum;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 领料人
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "领料人")
|
|
||||||
@Excel(name = "领料人")
|
|
||||||
private String leasePerson;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建者
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "创建者")
|
|
||||||
private String createBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 创建时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "创建时间")
|
|
||||||
@DateTimeFormat(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 createTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新者
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "更新者")
|
|
||||||
private String updateBy;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 更新时间
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "更新时间 ")
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
|
||||||
private Date updateTime;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 领料单位Id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "领料单位Id")
|
|
||||||
private Integer unitId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 领料单位
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "领料单位")
|
|
||||||
@Excel(name = "领料单位")
|
|
||||||
private String unitName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 领料工程Id
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "领料工程Id")
|
|
||||||
private Integer lotId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 领料工程
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "领料工程")
|
|
||||||
@Excel(name = "领料工程")
|
|
||||||
private String proName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 备注
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "备注")
|
|
||||||
private String remark;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 关键字
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "关键字")
|
|
||||||
private String keyWord;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "开始时间")
|
|
||||||
private String startTime;
|
|
||||||
|
|
||||||
@ApiModelProperty(value = "结束时间")
|
|
||||||
private String endTime;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 设备所属类型
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "数据所属组织")
|
|
||||||
private Integer companyId;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 装备管理方式(0编号 1计数)
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "装备管理方式")
|
|
||||||
private int manageType;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 装备管理方式(0编号 1计数)
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "装备管理方式名称")
|
|
||||||
private String manageTypeName;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 实时库存
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "实时库存")
|
|
||||||
private Double num;
|
|
||||||
/**
|
|
||||||
* 机具在用数量
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "机具在用数量")
|
|
||||||
private Integer useNumJj;
|
|
||||||
/**
|
|
||||||
* 调试在用数量
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "调试在用数量")
|
|
||||||
private Integer useNumTs;
|
|
||||||
/**
|
|
||||||
* 设备负责人
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "设备负责人")
|
|
||||||
private String typeKeepName;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -27,7 +27,6 @@ public class ParamsDto {
|
||||||
* 类型 验收1 入库2
|
* 类型 验收1 入库2
|
||||||
* */
|
* */
|
||||||
private String type;
|
private String type;
|
||||||
private String province;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 公司id
|
* 公司id
|
||||||
|
|
|
||||||
|
|
@ -47,7 +47,7 @@ public interface LargeScreenMapper {
|
||||||
* @author cwchen
|
* @author cwchen
|
||||||
* @date 2023/12/13 15:04
|
* @date 2023/12/13 15:04
|
||||||
*/
|
*/
|
||||||
List<EquipmentDis> getEquipmentDisByMap(ParamsDto dto);
|
List<EquipmentDisVo> getEquipmentDisByMap(ParamsDto dto);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param dto
|
* @param dto
|
||||||
|
|
@ -172,15 +172,5 @@ public interface LargeScreenMapper {
|
||||||
*/
|
*/
|
||||||
List<AccessVo> getRepairList(ParamsDto dto);
|
List<AccessVo> getRepairList(ParamsDto dto);
|
||||||
|
|
||||||
List<IotMaCodeMachine> getIotMaCodeMachine(String province);
|
List<IotMaCodeMachine> getIotMaCodeMachine();
|
||||||
|
|
||||||
List<EquipmentDisVo> getEquipmentDis(ParamsDto dto);
|
|
||||||
|
|
||||||
List<LeaseRecord> getLeaseRecordList(LeaseRecord leaseRecord);
|
|
||||||
|
|
||||||
String getTypeKeepName(LeaseRecord record);
|
|
||||||
|
|
||||||
Double getUseNumByLotId(LeaseRecord leaseRecord);
|
|
||||||
|
|
||||||
List<BackRecord> getBackRecordList(BackRecord backRecord);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -169,13 +169,5 @@ public interface ILargeScreenService {
|
||||||
*/
|
*/
|
||||||
AjaxResult getMaintenanceChartByMonth(ParamsDto dto);
|
AjaxResult getMaintenanceChartByMonth(ParamsDto dto);
|
||||||
|
|
||||||
List<IotMaCodeMachine> getIotMaCodeMachine(String province);
|
List<IotMaCodeMachine> getIotMaCodeMachine();
|
||||||
|
|
||||||
AjaxResult getEquipmentDis(ParamsDto dto);
|
|
||||||
|
|
||||||
List<LeaseRecord> getLeaseRecordList(LeaseRecord lotId);
|
|
||||||
|
|
||||||
LeaseRecord getUseNumByLotId(LeaseRecord leaseRecord);
|
|
||||||
|
|
||||||
List<BackRecord> getBackRecordListByLotId(BackRecord backRecord);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -81,8 +81,13 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult getEquipmentDisByMap(ParamsDto dto) {
|
public AjaxResult getEquipmentDisByMap(ParamsDto dto) {
|
||||||
List<EquipmentDis> equipmentDisByMap = mapper.getEquipmentDisByMap(dto);
|
List<EquipmentDisVo> list = new ArrayList<>();
|
||||||
return AjaxResult.success(equipmentDisByMap);
|
try {
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("设备分布", e);
|
||||||
|
}
|
||||||
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -360,54 +365,14 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<IotMaCodeMachine> getIotMaCodeMachine(String province) {
|
public List<IotMaCodeMachine> getIotMaCodeMachine() {
|
||||||
List<IotMaCodeMachine> iotMaCodeMachine = mapper.getIotMaCodeMachine(province);
|
List<IotMaCodeMachine> iotMaCodeMachine = mapper.getIotMaCodeMachine();
|
||||||
for (IotMaCodeMachine maCodeMachine : iotMaCodeMachine) {
|
for (IotMaCodeMachine maCodeMachine : iotMaCodeMachine) {
|
||||||
getLocation(maCodeMachine);
|
getLocation(maCodeMachine);
|
||||||
}
|
}
|
||||||
return iotMaCodeMachine;
|
return iotMaCodeMachine;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public AjaxResult getEquipmentDis(ParamsDto dto) {
|
|
||||||
List<EquipmentDisVo> equipmentDis = mapper.getEquipmentDis(dto);
|
|
||||||
return AjaxResult.success(equipmentDis);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<LeaseRecord> getLeaseRecordList(LeaseRecord leaseRecord) {
|
|
||||||
List<LeaseRecord> leaseRecordList = mapper.getLeaseRecordList(leaseRecord);
|
|
||||||
for (LeaseRecord record : leaseRecordList) {
|
|
||||||
String typeKeepName = mapper.getTypeKeepName(record);
|
|
||||||
record.setTypeKeepName(typeKeepName);
|
|
||||||
}
|
|
||||||
return leaseRecordList;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public LeaseRecord getUseNumByLotId(LeaseRecord leaseRecord) {
|
|
||||||
LeaseRecord leaseRecord1 = new LeaseRecord();
|
|
||||||
leaseRecord.setCompanyId(101);
|
|
||||||
Double useNumCom1 = mapper.getUseNumByLotId(leaseRecord);
|
|
||||||
if (useNumCom1 == null){
|
|
||||||
useNumCom1 = 0.00;
|
|
||||||
}
|
|
||||||
leaseRecord.setCompanyId(102);
|
|
||||||
Double useNumCom2 = mapper.getUseNumByLotId(leaseRecord);
|
|
||||||
if (useNumCom2 == null){
|
|
||||||
useNumCom2 = 0.00;
|
|
||||||
}
|
|
||||||
leaseRecord1.setUseNumJj(useNumCom1.intValue());
|
|
||||||
leaseRecord1.setUseNumTs(useNumCom2.intValue());
|
|
||||||
return leaseRecord1;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public List<BackRecord> getBackRecordListByLotId(BackRecord backRecord) {
|
|
||||||
List<BackRecord> leaseRecordList = mapper.getBackRecordList(backRecord);
|
|
||||||
return leaseRecordList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void getLocation(IotMaCodeMachine iotMaCodeMachine) {
|
public void getLocation(IotMaCodeMachine iotMaCodeMachine) {
|
||||||
log.info("getLocation:{}", iotMaCodeMachine);
|
log.info("getLocation:{}", iotMaCodeMachine);
|
||||||
if (iotMaCodeMachine == null || iotMaCodeMachine.getIotCode() == null) {
|
if (iotMaCodeMachine == null || iotMaCodeMachine.getIotCode() == null) {
|
||||||
|
|
@ -427,11 +392,8 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
map.put("deviceids", list);
|
map.put("deviceids", list);
|
||||||
String param = JSON.toJSONString(map);
|
String param = JSON.toJSONString(map);
|
||||||
String res = HttpHelper.doPost(HttpStatus.LAST_POSITION_URL + redisCode, param);
|
String res = HttpHelper.doPost(HttpStatus.LAST_POSITION_URL + redisCode, param);
|
||||||
String res1 = HttpHelper.doPost(HttpStatus.REPORT_OF_FLINE + redisCode, param);
|
|
||||||
//对返回的结果进行解析
|
//对返回的结果进行解析
|
||||||
IotLocationVo iotLocationVo = resultDataHandler(res);
|
IotLocationVo iotLocationVo = resultDataHandler(res);
|
||||||
String address = resultDataHandler1(res1);
|
|
||||||
iotLocationVo.setAddress(address);
|
|
||||||
iotMaCodeMachine.setIotLocationVo(iotLocationVo);
|
iotMaCodeMachine.setIotLocationVo(iotLocationVo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -446,7 +408,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
if ("0".equals(status) && "OK".equals(cause)) {
|
if ("0".equals(status) && "OK".equals(cause)) {
|
||||||
String records = object.getString("records");
|
String records = object.getString("records");
|
||||||
//判断返回结果是否为空
|
//判断返回结果是否为空
|
||||||
if (records != null) {
|
if (records != null){
|
||||||
JSONArray jsonArray = JSON.parseArray(records);
|
JSONArray jsonArray = JSON.parseArray(records);
|
||||||
for (int i = 0; i < jsonArray.size(); i++) {
|
for (int i = 0; i < jsonArray.size(); i++) {
|
||||||
JSONObject jsonObject = JSONObject.from(jsonArray.getJSONObject(i));
|
JSONObject jsonObject = JSONObject.from(jsonArray.getJSONObject(i));
|
||||||
|
|
@ -459,22 +421,6 @@ public class LargeScreenServiceImpl implements ILargeScreenService {
|
||||||
}
|
}
|
||||||
return iotLocationVo;
|
return iotLocationVo;
|
||||||
}
|
}
|
||||||
private String resultDataHandler1(String res) {
|
|
||||||
if (res == null) {
|
|
||||||
throw new RuntimeException(ExceptionEnum.RETURN_DATA_IS_EMPTY.getMsg());
|
|
||||||
}
|
|
||||||
String address = "";
|
|
||||||
JSONObject object = JSONObject.parseObject(res);
|
|
||||||
String status = object.getString("status");
|
|
||||||
String cause = object.getString("cause");
|
|
||||||
if ("0".equals(status) && "OK".equals(cause)) {
|
|
||||||
JSONObject addressmap = object.getJSONObject("addressmap");
|
|
||||||
for (String s : addressmap.keySet()) {
|
|
||||||
address = addressmap.get(s).toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return address;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult getTotalOwnership() {
|
public AjaxResult getTotalOwnership() {
|
||||||
|
|
|
||||||
|
|
@ -2,40 +2,11 @@
|
||||||
server:
|
server:
|
||||||
port: 29301
|
port: 29301
|
||||||
|
|
||||||
|
|
||||||
# Spring Boot Actuator V2中风险漏洞处理,禁止远程端口访问
|
|
||||||
management:
|
|
||||||
endpoint:
|
|
||||||
env:
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
# Spring
|
# Spring
|
||||||
spring:
|
spring:
|
||||||
application:
|
application:
|
||||||
# 应用名称
|
# 应用名称
|
||||||
name: sgzb-base
|
name: sgzb-base
|
||||||
profiles:
|
profiles:
|
||||||
# 环境配置
|
# 环境配置
|
||||||
active: sgzb_cloud_local
|
active: sgzb_cloud_local
|
||||||
cloud:
|
|
||||||
loadbalancer:
|
|
||||||
# 关闭Ribbon的负载均衡器
|
|
||||||
ribbon:
|
|
||||||
enabled: false
|
|
||||||
# 开启Nacos的负载均衡器
|
|
||||||
nacos:
|
|
||||||
enabled: true
|
|
||||||
nacos:
|
|
||||||
discovery:
|
|
||||||
# 服务注册地址
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
namespace: sgzb_cloud_dev_nxjj
|
|
||||||
config:
|
|
||||||
# 配置中心地址
|
|
||||||
server-addr: 127.0.0.1:8848
|
|
||||||
namespace: sgzb_cloud_dev_nxjj
|
|
||||||
# 配置文件格式
|
|
||||||
file-extension: yml
|
|
||||||
# 共享配置
|
|
||||||
shared-configs:
|
|
||||||
- application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension}
|
|
||||||
|
|
@ -321,7 +321,7 @@
|
||||||
<if test="fileUrl != null and fileUrl != ''">
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
file_url,
|
file_url,
|
||||||
</if>
|
</if>
|
||||||
<if test="companyId != null and companyId !=''">
|
<if test="companyId != null">
|
||||||
company_id,
|
company_id,
|
||||||
</if>
|
</if>
|
||||||
create_time
|
create_time
|
||||||
|
|
@ -361,7 +361,7 @@
|
||||||
<if test="fileUrl != null and fileUrl != ''">
|
<if test="fileUrl != null and fileUrl != ''">
|
||||||
#{fileUrl},
|
#{fileUrl},
|
||||||
</if>
|
</if>
|
||||||
<if test="companyId != null and companyId !=''">
|
<if test="companyId != null">
|
||||||
#{companyId},
|
#{companyId},
|
||||||
</if>
|
</if>
|
||||||
NOW()
|
NOW()
|
||||||
|
|
@ -718,7 +718,6 @@
|
||||||
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as num,
|
IFNULL(bad.audit_num,0)-IFNULL(aa.back_num,0) as num,
|
||||||
bb.finished_back_num,
|
bb.finished_back_num,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
mt.company_id as companyId,
|
|
||||||
CONCAT('NSJJ',mt.`code`,mt.model_code) as `code`
|
CONCAT('NSJJ',mt.`code`,mt.model_code) as `code`
|
||||||
FROM
|
FROM
|
||||||
back_apply_details bad
|
back_apply_details bad
|
||||||
|
|
|
||||||
|
|
@ -1129,7 +1129,6 @@
|
||||||
mt2.type_name as typeName,
|
mt2.type_name as typeName,
|
||||||
mt.type_name as typeModelName,
|
mt.type_name as typeModelName,
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
mt.company_id as companyId,
|
|
||||||
GROUP_CONCAT(su.user_id) as userId,
|
GROUP_CONCAT(su.user_id) as userId,
|
||||||
GROUP_CONCAT(su.nick_name) as userName,
|
GROUP_CONCAT(su.nick_name) as userName,
|
||||||
lad.status as status,
|
lad.status as status,
|
||||||
|
|
@ -1313,7 +1312,6 @@
|
||||||
ifnull(lad.al_num,0) as alNum,
|
ifnull(lad.al_num,0) as alNum,
|
||||||
mt2.type_name as typeName,
|
mt2.type_name as typeName,
|
||||||
mt.type_name as typeModelName,
|
mt.type_name as typeModelName,
|
||||||
mt.company_id as companyId,
|
|
||||||
mt.manage_type as manageType,
|
mt.manage_type as manageType,
|
||||||
GROUP_CONCAT(su.nick_name) as userName,
|
GROUP_CONCAT(su.nick_name) as userName,
|
||||||
GROUP_CONCAT(su.user_id) as userId,
|
GROUP_CONCAT(su.user_id) as userId,
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<!--<include refid="bmProjectInfo"/>-->
|
<!--<include refid="bmProjectInfo"/>-->
|
||||||
select a.lot_id, a.pro_id, a.lot_name, a.status, a.type_id, a.link_man, a.telphone, a.own_pro, a.dept_id, a.is_share,
|
select a.lot_id, a.pro_id, a.lot_name, a.status, a.type_id, a.link_man, a.telphone, a.own_pro, a.dept_id, a.is_share,
|
||||||
a.lon, a.lat, a.del_flag, a.create_by, a.create_time,a.remark,a.company_id ,b.dept_name, c.name,a.start_date,a.completion_date,
|
a.lon, a.lat, a.del_flag, a.create_by, a.create_time,a.remark,a.company_id ,b.dept_name, c.name,a.start_date,a.completion_date,
|
||||||
a.longitude,a.latitude,a.address,a.province
|
a.longitude,a.latitude,a.address
|
||||||
from bm_project_lot a
|
from bm_project_lot a
|
||||||
left join sys_dept b on a.dept_id = b.dept_id
|
left join sys_dept b on a.dept_id = b.dept_id
|
||||||
left join sys_dic c on a.type_id = c.id
|
left join sys_dic c on a.type_id = c.id
|
||||||
|
|
@ -121,7 +121,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="longitude != null and longitude != ''">longitude,</if>
|
<if test="longitude != null and longitude != ''">longitude,</if>
|
||||||
<if test="latitude != null and latitude != ''">latitude,</if>
|
<if test="latitude != null and latitude != ''">latitude,</if>
|
||||||
<if test="address != null and address != ''">address,</if>
|
<if test="address != null and address != ''">address,</if>
|
||||||
<if test="province != null and province != ''">province,</if>
|
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="lotName != null and lotName != ''">#{lotName},</if>
|
<if test="lotName != null and lotName != ''">#{lotName},</if>
|
||||||
|
|
@ -142,7 +141,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="longitude != null and longitude != ''">#{longitude},</if>
|
<if test="longitude != null and longitude != ''">#{longitude},</if>
|
||||||
<if test="latitude != null and latitude != ''">#{latitude},</if>
|
<if test="latitude != null and latitude != ''">#{latitude},</if>
|
||||||
<if test="address != null and address != ''">#{address},</if>
|
<if test="address != null and address != ''">#{address},</if>
|
||||||
<if test="province != null and province != ''">#{province},</if>
|
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
@ -164,8 +162,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
<if test="companyId != null and companyId != ''">company_id = #{companyId},</if>
|
||||||
<if test="startDate != null and startDate != ''">start_date = #{startDate},</if>
|
<if test="startDate != null and startDate != ''">start_date = #{startDate},</if>
|
||||||
<if test="completionDate != null and completionDate != ''">completion_date = #{completionDate},</if>
|
<if test="completionDate != null and completionDate != ''">completion_date = #{completionDate},</if>
|
||||||
<if test="longitude != null and longitude != ''">longitude = #{longitude},</if>
|
|
||||||
<if test="latitude != null and latitude != ''">latitude = #{latitude},</if>
|
|
||||||
<if test="address != null and address != ''">address = #{address},</if>
|
<if test="address != null and address != ''">address = #{address},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
|
|
|
||||||
|
|
@ -41,13 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<!--设备分布-->
|
<!--设备分布-->
|
||||||
<select id="getEquipmentDisByMap" resultType="com.bonus.sgzb.largeScreen.domain.EquipmentDis">
|
<select id="getEquipmentDisByMap" resultType="com.bonus.sgzb.largeScreen.domain.EquipmentDisVo"></select>
|
||||||
select count(*) as num,province from bm_project_lot where province is not null
|
|
||||||
<if test="province!=null and province != ''">
|
|
||||||
AND province = #{province}
|
|
||||||
</if>
|
|
||||||
GROUP BY province
|
|
||||||
</select>
|
|
||||||
<!--新购验收入库分析-->
|
<!--新购验收入库分析-->
|
||||||
<select id="getAcceptanceStorage" resultType="java.util.Map">
|
<select id="getAcceptanceStorage" resultType="java.util.Map">
|
||||||
/*验收*/
|
/*验收*/
|
||||||
|
|
@ -897,7 +891,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mt.type_name as typeModelName,
|
mt.type_name as typeModelName,
|
||||||
mt1.type_name as typeName,
|
mt1.type_name as typeName,
|
||||||
bpl.lot_id as projectId,
|
bpl.lot_id as projectId,
|
||||||
sai.agreement_id as agreementId,
|
|
||||||
bpl.lot_name as projectName,
|
bpl.lot_name as projectName,
|
||||||
sd.name as maStatus,
|
sd.name as maStatus,
|
||||||
mm.type_id,
|
mm.type_id,
|
||||||
|
|
@ -917,141 +910,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN bm_project_lot bpl ON bai.project_id = bpl.lot_id
|
LEFT JOIN bm_project_lot bpl ON bai.project_id = bpl.lot_id
|
||||||
WHERE
|
WHERE
|
||||||
im.bind_status = 0
|
im.bind_status = 0
|
||||||
AND imb.unbind_time IS NULL and sai.`status` = 0 and bpl.province = #{province}
|
AND imb.unbind_time IS NULL and sai.`status` = 0
|
||||||
</select>
|
</select>
|
||||||
<select id="getEquipmentDis" resultType="com.bonus.sgzb.largeScreen.domain.EquipmentDisVo">
|
|
||||||
select longitude,
|
|
||||||
lot_id as lotId,
|
|
||||||
latitude,
|
|
||||||
lot_name as lotName,
|
|
||||||
address,
|
|
||||||
province
|
|
||||||
from bm_project_lot where province = #{province}
|
|
||||||
</select>
|
|
||||||
<select id="getLeaseRecordList" resultType="com.bonus.sgzb.largeScreen.domain.LeaseRecord">
|
|
||||||
SELECT
|
|
||||||
mt2.type_name AS typeName,
|
|
||||||
lai.lease_person AS leasePerson,
|
|
||||||
mt.type_id AS typeId,
|
|
||||||
mt.type_name AS typeModelName,
|
|
||||||
bai.agreement_code AS agreementCode,
|
|
||||||
mm.ma_code AS maCode,
|
|
||||||
mt.unit_name AS unit,
|
|
||||||
lod.out_num AS preNum,
|
|
||||||
lai.`code` AS code,
|
|
||||||
lod.create_time AS createTime,
|
|
||||||
bpl.lot_name AS proName,
|
|
||||||
lod.car_code AS carCode,
|
|
||||||
bui.unit_name AS unitName
|
|
||||||
FROM
|
|
||||||
lease_out_details lod
|
|
||||||
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id
|
|
||||||
LEFT JOIN tm_task_agreement tta ON tta.task_id = lai.task_id
|
|
||||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
|
||||||
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
|
||||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = lod.type_id
|
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
|
||||||
LEFT JOIN ma_machine mm ON mm.ma_id = lod.ma_id
|
|
||||||
WHERE
|
|
||||||
bpl.lot_id = #{lotId}
|
|
||||||
<if test="code != null and code != ''">
|
|
||||||
and lai.code = #{code}
|
|
||||||
</if>
|
|
||||||
<if test="typeId != null">
|
|
||||||
and mt.type_id = #{typeId}
|
|
||||||
</if>
|
|
||||||
<if test="unitId != null">
|
|
||||||
and bui.unit_id = #{unitId}
|
|
||||||
</if>
|
|
||||||
<if test="companyId != null">
|
|
||||||
and lod.company_id = #{companyId}
|
|
||||||
</if>
|
|
||||||
order by lod.create_time desc
|
|
||||||
</select>
|
|
||||||
<select id="getTypeKeepName" resultType="java.lang.String">
|
|
||||||
SELECT
|
|
||||||
group_concat(su.nick_name) as typeKeepName
|
|
||||||
FROM
|
|
||||||
ma_type mt
|
|
||||||
LEFT JOIN ma_type_keeper mtk ON mt.type_id = mtk.type_id
|
|
||||||
LEFT JOIN sys_user su ON mtk.user_id = su.user_id
|
|
||||||
WHERE
|
|
||||||
mtk.type_id = #{typeId}
|
|
||||||
</select>
|
|
||||||
<select id="getUseNumByLotId" resultType="java.lang.Double">
|
|
||||||
SELECT
|
|
||||||
IFNULL( t1.outNum, 0 ) - IFNULL( t2.backNum, 0 ) AS useNum
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
SELECT
|
|
||||||
SUM( lod.out_num ) AS outNum,
|
|
||||||
bai.unit_id,
|
|
||||||
bai.project_id
|
|
||||||
FROM
|
|
||||||
lease_out_details lod
|
|
||||||
LEFT JOIN lease_apply_info lai ON lai.id = lod.parent_id
|
|
||||||
LEFT JOIN tm_task_agreement tta ON tta.task_id = lai.task_id
|
|
||||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
|
||||||
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
|
||||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = lod.type_id
|
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
|
||||||
WHERE
|
|
||||||
bpl.lot_id = #{lotId}
|
|
||||||
AND lod.company_id = #{companyId}
|
|
||||||
GROUP BY
|
|
||||||
bai.project_id
|
|
||||||
) t1
|
|
||||||
LEFT JOIN (
|
|
||||||
SELECT
|
|
||||||
SUM( bcd.back_num ) AS backNum,
|
|
||||||
bai.unit_id,
|
|
||||||
bai.project_id
|
|
||||||
FROM
|
|
||||||
back_check_details bcd
|
|
||||||
LEFT JOIN back_apply_info bapi ON bapi.id = bcd.parent_id
|
|
||||||
LEFT JOIN tm_task_agreement tta ON tta.task_id = bapi.task_id
|
|
||||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
|
||||||
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
|
||||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = bcd.type_id
|
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
|
||||||
WHERE
|
|
||||||
bpl.lot_id = #{lotId}
|
|
||||||
AND bcd.company_id = #{companyId}
|
|
||||||
GROUP BY
|
|
||||||
bai.project_id,
|
|
||||||
bcd.company_id
|
|
||||||
) t2 ON t1.unit_id = t2.unit_id
|
|
||||||
AND t1.project_id = t2.project_id
|
|
||||||
</select>
|
|
||||||
<select id="getBackRecordList" resultType="com.bonus.sgzb.largeScreen.domain.BackRecord">
|
|
||||||
SELECT
|
|
||||||
mt2.type_name AS typeName,
|
|
||||||
mt.type_name AS typeModelName,
|
|
||||||
baif.`code`,
|
|
||||||
mm.ma_code AS maCode,
|
|
||||||
bcd.back_num AS backNum,
|
|
||||||
baif.back_person AS backPerson,
|
|
||||||
bcd.create_time AS createTime,
|
|
||||||
bpl.lot_name AS proName,
|
|
||||||
bui.unit_name AS unitName
|
|
||||||
FROM
|
|
||||||
back_check_details bcd
|
|
||||||
LEFT JOIN back_apply_info baif ON baif.id = bcd.parent_id
|
|
||||||
LEFT JOIN tm_task_agreement tta ON tta.task_id = baif.task_id
|
|
||||||
LEFT JOIN bm_agreement_info bai ON bai.agreement_id = tta.agreement_id
|
|
||||||
LEFT JOIN bm_project_lot bpl ON bpl.lot_id = bai.project_id
|
|
||||||
LEFT JOIN bm_unit_info bui ON bui.unit_id = bai.unit_id
|
|
||||||
LEFT JOIN ma_type mt ON mt.type_id = bcd.type_id
|
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id
|
|
||||||
LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id
|
|
||||||
WHERE
|
|
||||||
bpl.lot_id = #{lotId}
|
|
||||||
ORDER BY
|
|
||||||
bcd.create_time DESC
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue