配件库存、维修单签名
This commit is contained in:
parent
9654565123
commit
a1a2bc44ad
|
|
@ -8,13 +8,19 @@ import com.bonus.common.core.utils.bean.BeanUtils;
|
||||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||||
import com.bonus.common.core.web.controller.BaseController;
|
import com.bonus.common.core.web.controller.BaseController;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
|
import com.bonus.common.log.annotation.SysLog;
|
||||||
|
import com.bonus.common.log.enums.OperaType;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import com.bonus.material.basic.domain.ProjUsingRecordExports;
|
import com.bonus.material.basic.domain.ProjUsingRecordExports;
|
||||||
import com.bonus.material.basic.domain.*;
|
import com.bonus.material.basic.domain.*;
|
||||||
import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
|
import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
|
||||||
import com.bonus.material.basic.service.ComplexQueryService;
|
import com.bonus.material.basic.service.ComplexQueryService;
|
||||||
|
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||||
import com.bonus.material.lease.mapper.LeaseApplyInfoMapper;
|
import com.bonus.material.lease.mapper.LeaseApplyInfoMapper;
|
||||||
import com.bonus.material.ma.domain.Type;
|
import com.bonus.material.ma.domain.Type;
|
||||||
|
import com.bonus.material.part.domain.PartInventory;
|
||||||
|
import com.bonus.material.part.domain.PartTypeCheckInfo;
|
||||||
|
import com.bonus.material.part.domain.PartTypeQueryDto;
|
||||||
import com.bonus.system.api.model.LoginUser;
|
import com.bonus.system.api.model.LoginUser;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
@ -474,6 +480,19 @@ public class ComplexQueryController extends BaseController {
|
||||||
return AjaxResult.success(getDataTable(pageList));
|
return AjaxResult.success(getDataTable(pageList));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 导出配件库存
|
||||||
|
*/
|
||||||
|
@ApiOperation("导出配件库存")
|
||||||
|
@PreventRepeatSubmit
|
||||||
|
@SysLog(title = "导出配件库存", businessType = OperaType.EXPORT, module = "配件库存->导出配件库存")
|
||||||
|
@PostMapping("/export")
|
||||||
|
public void export(HttpServletResponse response, RetainedEquipmentInfo bean) {
|
||||||
|
List<PartInventory> list = complexQueryService.getPartInventory(bean);
|
||||||
|
ExcelUtil<PartInventory> util = new ExcelUtil<>(PartInventory.class);
|
||||||
|
util.exportExcel(response, list, "配件库存");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 施工机具需求、供应分析统计表
|
* 施工机具需求、供应分析统计表
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.bonus.material.basic.mapper;
|
||||||
import com.bonus.material.basic.domain.*;
|
import com.bonus.material.basic.domain.*;
|
||||||
import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
|
import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
|
||||||
import com.bonus.material.ma.domain.Type;
|
import com.bonus.material.ma.domain.Type;
|
||||||
|
import com.bonus.material.part.domain.PartInventory;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -240,4 +241,11 @@ public interface ComplexQueryMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<RepairStorageInfo> getRepairAuditList(RepairStorageInfo bean);
|
List<RepairStorageInfo> getRepairAuditList(RepairStorageInfo bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取配件库存数量
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PartInventory> getPartInventory(RetainedEquipmentInfo bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,8 @@ package com.bonus.material.basic.service;
|
||||||
import com.bonus.material.basic.domain.*;
|
import com.bonus.material.basic.domain.*;
|
||||||
import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
|
import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
|
||||||
import com.bonus.material.ma.domain.Type;
|
import com.bonus.material.ma.domain.Type;
|
||||||
|
import com.bonus.material.part.domain.PartInventory;
|
||||||
|
import com.bonus.material.part.domain.PartTypeQueryDto;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -152,4 +154,11 @@ public interface ComplexQueryService {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<Type> getStorageNumLogDetails(Type bean);
|
List<Type> getStorageNumLogDetails(Type bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 配件库存查询
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<PartInventory> getPartInventory(RetainedEquipmentInfo bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ import com.bonus.material.basic.domain.vo.MaTypeSelectInfo;
|
||||||
import com.bonus.material.basic.mapper.ComplexQueryMapper;
|
import com.bonus.material.basic.mapper.ComplexQueryMapper;
|
||||||
import com.bonus.material.basic.service.ComplexQueryService;
|
import com.bonus.material.basic.service.ComplexQueryService;
|
||||||
import com.bonus.material.ma.domain.Type;
|
import com.bonus.material.ma.domain.Type;
|
||||||
|
import com.bonus.material.part.domain.PartInventory;
|
||||||
|
import com.bonus.material.part.domain.PartTypeQueryDto;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
@ -790,4 +792,16 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
||||||
return new ArrayList<>();
|
return new ArrayList<>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<PartInventory> getPartInventory(RetainedEquipmentInfo bean) {
|
||||||
|
try {
|
||||||
|
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||||
|
bean.setUserId(userId);
|
||||||
|
return complexQueryMapper.getPartInventory(bean);
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return new ArrayList<>();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,32 @@
|
||||||
|
package com.bonus.material.part.domain;
|
||||||
|
|
||||||
|
import com.bonus.common.core.annotation.Excel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class PartInventory {
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "规格ID")
|
||||||
|
private Integer typeId;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "物资名称")
|
||||||
|
@Excel(name = "配件名称")
|
||||||
|
private String typeName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "规格型号")
|
||||||
|
@Excel(name = "规格型号")
|
||||||
|
private String typeModelName;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "计量单位")
|
||||||
|
@Excel(name = "单位")
|
||||||
|
private String unit;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "在库数量")
|
||||||
|
@Excel(name = "库存",cellType = Excel.ColumnType.NUMERIC)
|
||||||
|
private BigDecimal storeNum;
|
||||||
|
}
|
||||||
|
|
@ -212,4 +212,18 @@ public class RepairTask {
|
||||||
|
|
||||||
@ApiModelProperty(value = "退料ID")
|
@ApiModelProperty(value = "退料ID")
|
||||||
private Long backId;
|
private Long backId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 签名地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "签名地址")
|
||||||
|
private String signUrl;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "签名类型 手写0 和 图片上传1")
|
||||||
|
private int signType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维修完成时间
|
||||||
|
*/
|
||||||
|
private String repairTime;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -326,6 +326,11 @@ public class RepairServiceImpl implements RepairService {
|
||||||
if (Objects.isNull(repairTaskInfo)) {
|
if (Objects.isNull(repairTaskInfo)) {
|
||||||
return AjaxResult.error("未查询到维修任务信息");
|
return AjaxResult.error("未查询到维修任务信息");
|
||||||
}
|
}
|
||||||
|
if (StringUtils.isNotBlank(repairTaskInfo.getSignUrl())) {
|
||||||
|
if (!repairTaskInfo.getSignUrl().startsWith("http")) {
|
||||||
|
repairTaskInfo.setSignUrl("data:image/png;base64," + repairTaskInfo.getSignUrl());
|
||||||
|
}
|
||||||
|
}
|
||||||
// 查询维修任务详情
|
// 查询维修任务详情
|
||||||
// List<RepairDeviceListVo> repairMaTypeGroupList = getRepairMaTypeList(new RepairTaskDetails(taskId), true);
|
// List<RepairDeviceListVo> repairMaTypeGroupList = getRepairMaTypeList(new RepairTaskDetails(taskId), true);
|
||||||
// repairMaTypeGroupList.removeIf(Objects::isNull);
|
// repairMaTypeGroupList.removeIf(Objects::isNull);
|
||||||
|
|
@ -1026,7 +1031,7 @@ public class RepairServiceImpl implements RepairService {
|
||||||
}
|
}
|
||||||
repairApplyRecord.setCreateBy(loginUser.getSysUser().getNickName());
|
repairApplyRecord.setCreateBy(loginUser.getSysUser().getNickName());
|
||||||
repairApplyRecord.setStatus(0L);
|
repairApplyRecord.setStatus(0L);
|
||||||
if (bean.getInRepairList() != null) {
|
if (bean.getInRepairList() != null && bean.getInRepairList().size() > 0) {
|
||||||
repairApplyRecord.setRemark(StringUtils.isNotBlank(bean.getInRepairList().get(0).getRemark()) ? bean.getInRepairList().get(0).getRemark() : "");
|
repairApplyRecord.setRemark(StringUtils.isNotBlank(bean.getInRepairList().get(0).getRemark()) ? bean.getInRepairList().get(0).getRemark() : "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1819,5 +1819,32 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</if>
|
</if>
|
||||||
GROUP BY mm.ma_id,tt.`code`,mt.type_id
|
GROUP BY mm.ma_id,tt.`code`,mt.type_id
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getPartInventory" resultType="com.bonus.material.part.domain.PartInventory">
|
||||||
|
SELECT
|
||||||
|
mt.pa_id AS typeId,
|
||||||
|
mt2.pa_name AS typeName,
|
||||||
|
mt2.pa_id AS thirdTypeId,
|
||||||
|
mt.pa_name AS typeModelName,
|
||||||
|
mt.unit_name AS unit,
|
||||||
|
mt.storage_num AS storeNum
|
||||||
|
FROM ma_part_type mt
|
||||||
|
LEFT JOIN ma_part_type mt2 on mt2.pa_id = mt.parent_id
|
||||||
|
<if test="userId != null">
|
||||||
|
JOIN ma_part_type_keeper mtk ON mtk.type_id = mt.pa_id AND mtk.user_id = #{userId}
|
||||||
|
</if>
|
||||||
|
WHERE mt.del_flag = '0' and mt.`level` = '3'
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
and (
|
||||||
|
mt2.pa_name like concat('%',#{keyWord},'%') or
|
||||||
|
mt.pa_name like concat('%',#{keyWord},'%')
|
||||||
|
)
|
||||||
|
</if>
|
||||||
|
<if test="typeName != null and typeName != ''">
|
||||||
|
and mt2.pa_name like concat('%',#{typeName},'%')
|
||||||
|
</if>
|
||||||
|
<if test="typeModelName != null and typeModelName != ''">
|
||||||
|
and mt.pa_name like concat('%',#{typeModelName},'%')
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -230,6 +230,14 @@
|
||||||
|
|
||||||
<select id="getRepairTaskInfoByTaskId" resultType="com.bonus.material.repair.domain.RepairTask">
|
<select id="getRepairTaskInfoByTaskId" resultType="com.bonus.material.repair.domain.RepairTask">
|
||||||
SELECT
|
SELECT
|
||||||
|
a.*,
|
||||||
|
su2.sign_url as signUrl,
|
||||||
|
su2.sign_type as signType,
|
||||||
|
LEFT(rad.create_time,10) as repairTime
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
MAX(rd.id) as repairId,
|
||||||
rd.task_id as taskId,
|
rd.task_id as taskId,
|
||||||
rd.repairer,rd.repaired_num,rd.scrap_num,
|
rd.repairer,rd.repaired_num,rd.scrap_num,
|
||||||
tt.CODE AS repairCode,
|
tt.CODE AS repairCode,
|
||||||
|
|
@ -241,7 +249,8 @@
|
||||||
bpi.pro_name AS backPro,
|
bpi.pro_name AS backPro,
|
||||||
su.nick_name AS createName,
|
su.nick_name AS createName,
|
||||||
bai.CODE AS backCode,
|
bai.CODE AS backCode,
|
||||||
GROUP_CONCAT(DISTINCT mt2.type_name) as type
|
GROUP_CONCAT(DISTINCT mt2.type_name) as type,
|
||||||
|
MAX(rd.update_by) as updateBy
|
||||||
FROM
|
FROM
|
||||||
repair_apply_details rd
|
repair_apply_details rd
|
||||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||||
|
|
@ -255,6 +264,9 @@
|
||||||
left join sys_user su on rd.create_by = su.user_id
|
left join sys_user su on rd.create_by = su.user_id
|
||||||
where rd.task_id = #{taskId}
|
where rd.task_id = #{taskId}
|
||||||
GROUP BY rd.task_id
|
GROUP BY rd.task_id
|
||||||
|
) a
|
||||||
|
LEFT JOIN sys_user su2 on su2.user_id=a.updateBy
|
||||||
|
LEFT JOIN repair_audit_details rad on rad.repair_id=a.repairId
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="getRepairTaskList" resultType="com.bonus.material.repair.domain.RepairTask">
|
<select id="getRepairTaskList" resultType="com.bonus.material.repair.domain.RepairTask">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue