后台修饰管理导出代码提交
This commit is contained in:
parent
19af666b60
commit
c956bca3af
|
|
@ -4,16 +4,19 @@ import com.alibaba.fastjson.JSONObject;
|
|||
import com.bonus.sgzb.base.domain.*;
|
||||
import com.bonus.sgzb.base.domain.vo.dictVo;
|
||||
import com.bonus.sgzb.base.service.RepairService;
|
||||
import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.core.web.page.TableDataInfo;
|
||||
import com.bonus.sgzb.common.log.annotation.Log;
|
||||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||
import com.bonus.sgzb.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.sgzb.system.api.domain.SysUser;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -40,6 +43,19 @@ public class RepairController extends BaseController {
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出维修任务列表
|
||||
*/
|
||||
@RequiresPermissions("domain:details:export")
|
||||
@Log(title = "维修任务列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RepairTask bean)
|
||||
{
|
||||
List<RepairTask> list = service.exportRepairTaskList(bean);
|
||||
ExcelUtil<RepairTask> util = new ExcelUtil<RepairTask>(RepairTask.class);
|
||||
util.exportExcel(response, list, "维修任务列表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取维修任务列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.base.domain;
|
||||
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
|
@ -20,22 +21,20 @@ public class RepairTask {
|
|||
* 维修单号
|
||||
*/
|
||||
@ApiModelProperty(value = "维修单号")
|
||||
@Excel(name = "维修单号",sort = 1)
|
||||
private String repairCode;
|
||||
/**
|
||||
* 退料单位名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料单位名称")
|
||||
@Excel(name = "退料单位名称",sort = 2)
|
||||
private String backUnit;
|
||||
/**
|
||||
* 退料工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料工程名称")
|
||||
@Excel(name = "退料工程名称",sort = 3)
|
||||
private String backPro;
|
||||
/**
|
||||
* 维修机具类型
|
||||
*/
|
||||
@ApiModelProperty(value = "维修机具类型")
|
||||
private String type;
|
||||
/**
|
||||
* 任务创建人
|
||||
*/
|
||||
|
|
@ -45,22 +44,26 @@ public class RepairTask {
|
|||
* 任务创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建人")
|
||||
@Excel(name = "任务创建人",sort = 4)
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 任务创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建时间")
|
||||
@Excel(name = "任务创建时间",sort = 5)
|
||||
private String createTime;
|
||||
/**
|
||||
* 退料单号
|
||||
*/
|
||||
@ApiModelProperty(value = "退料单号")
|
||||
@Excel(name = "退料单号",sort = 6)
|
||||
private String backCode;
|
||||
/**
|
||||
* 维修状态
|
||||
*/
|
||||
@ApiModelProperty(value = "维修状态")
|
||||
@Excel(name = "维修状态",sort = 7)
|
||||
private String repairStatus;
|
||||
private String keyword;//关键字
|
||||
private String startTime;//开始时间
|
||||
|
|
@ -68,4 +71,58 @@ public class RepairTask {
|
|||
private Long companyId;//
|
||||
private Long agreementId;//
|
||||
private String repairStatusCode;//
|
||||
/**
|
||||
* 维修机具类型
|
||||
*/
|
||||
@ApiModelProperty(value = "维修机具类型")
|
||||
@Excel(name = "维修机具类型",sort = 8)
|
||||
private String type;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号",sort = 9)
|
||||
private String typeName;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
@ApiModelProperty(value = "编码")
|
||||
@Excel(name = "编码",sort = 10)
|
||||
private String code;
|
||||
/**
|
||||
* 维修总量
|
||||
*/
|
||||
@ApiModelProperty(value = "维修总量")
|
||||
@Excel(name = "维修总量",sort = 11)
|
||||
private int repairNum;
|
||||
/**
|
||||
* 维修合格数量
|
||||
*/
|
||||
@ApiModelProperty(value = "维修合格数量")
|
||||
@Excel(name = "维修合格数量",sort = 12)
|
||||
private int repairedNum;
|
||||
/**
|
||||
* 维修报废数量
|
||||
*/
|
||||
@ApiModelProperty(value = "报废数量")
|
||||
@Excel(name = "维修报废数量",sort = 13)
|
||||
private int scrapNum;
|
||||
/**
|
||||
* 待修状态
|
||||
*/
|
||||
@ApiModelProperty(value = "待修状态")
|
||||
@Excel(name = "待修状态",sort = 14)
|
||||
private String status;
|
||||
/**
|
||||
* 维修人员
|
||||
*/
|
||||
@ApiModelProperty(value = "维修人员")
|
||||
@Excel(name = "维修人员",sort = 15)
|
||||
private String repairer;
|
||||
/**
|
||||
* 维修时间
|
||||
*/
|
||||
@ApiModelProperty(value = "维修时间")
|
||||
@Excel(name = "维修时间",sort = 16)
|
||||
private String updateTime;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,4 +56,6 @@ public interface RepairMapper {
|
|||
List<RepairTaskDetails> getDetailsListByTaskId(RepairTask task);
|
||||
|
||||
int addAuditDetails(RepairTaskDetails details);
|
||||
|
||||
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,4 +35,6 @@ public interface RepairService {
|
|||
AjaxResult endRepairTask(List<RepairTask> taskList);
|
||||
|
||||
List<dictVo> getDicSelect(String value);
|
||||
|
||||
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,6 +41,11 @@ public class RepairServiceImpl implements RepairService {
|
|||
return repairTaskList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairTask> exportRepairTaskList(RepairTask bean) {
|
||||
return mapper.exportRepairTaskList(bean);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairTaskDetails> getRepairMaTypeList(RepairTaskDetails bean) {
|
||||
List<RepairTaskDetails> repairMaTypeList = mapper.getRepairMaTypeList(bean);
|
||||
|
|
@ -183,6 +188,8 @@ public class RepairServiceImpl implements RepairService {
|
|||
return mapper.getDicSelect(value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public int completeRepair(ArrayList<Long> ids) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
|
|
|
|||
|
|
@ -116,6 +116,68 @@
|
|||
order by tt.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="exportRepairTaskList" resultType="com.bonus.sgzb.base.domain.RepairTask">
|
||||
SELECT
|
||||
rd.task_id,
|
||||
tt.CODE AS repairCode,
|
||||
bui.unit_name AS backUnit,
|
||||
bpi.lot_name AS backPro,
|
||||
su.user_name AS createName,
|
||||
tt.create_time AS createTime,
|
||||
bai.CODE AS backCode,
|
||||
sd.NAME AS repairStatus,
|
||||
tt.task_status AS repairStatusCode,
|
||||
tt.company_id AS companyId,
|
||||
mt2.type_name AS type,
|
||||
mt.type_name AS typeName,
|
||||
mm.ma_code AS CODE,
|
||||
rd.repair_num AS repairNum,
|
||||
rd.repaired_num AS repairedNum,
|
||||
rd.scrap_num AS scrapNum,
|
||||
case rd.status when '0' then '未完成' when '1' then '已完成' else '' end as status,
|
||||
su2.user_name as repairer,
|
||||
rd.update_time as updateTime
|
||||
FROM
|
||||
repair_apply_details rd
|
||||
LEFT JOIN ma_type mt ON rd.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN tm_task tt ON rd.task_id = tt.task_id
|
||||
LEFT JOIN back_apply_info bai ON rd.back_id = bai.id
|
||||
LEFT JOIN tm_task_agreement tta ON bai.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai2 ON tta.agreement_id = bai2.agreement_id
|
||||
LEFT JOIN bm_unit_info bui ON bai2.unit_id = bui.unit_id
|
||||
LEFT JOIN bm_project_lot bpi ON bai2.project_id = bpi.lot_id AND bpi.STATUS = '0' AND bpi.del_flag = '0'
|
||||
LEFT JOIN sys_user su ON rd.create_by = su.user_id
|
||||
left join sys_user su2 on rd.repairer = su2.user_id
|
||||
LEFT JOIN sys_dic sd ON sd.id = tt.task_status
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = rd.ma_id
|
||||
where 1=1
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, su.user_name) > 0
|
||||
or locate(#{keyword}, tt.CODE) > 0)
|
||||
</if>
|
||||
<if test="backUnit != null and backUnit != ''">
|
||||
AND bui.unit_id = #{backUnit}
|
||||
</if>
|
||||
<if test="backPro != null and backPro != ''">
|
||||
AND bpi.pro_id = #{backPro}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND mt2.type_id = #{type}
|
||||
</if>
|
||||
<if test="backCode != null and backCode != ''">
|
||||
AND locate(#{backCode}, bai.CODE) > 0
|
||||
</if>
|
||||
<if test="repairStatus != null and repairStatus != ''">
|
||||
AND tt.task_status = #{repairStatus}
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND ts.create_time between #{startTime} and #{endTime}
|
||||
</if>
|
||||
ORDER BY
|
||||
tt.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="getRepairMaTypeList" resultType="com.bonus.sgzb.base.domain.RepairTaskDetails">
|
||||
select rad.id as id,
|
||||
rad.task_id as taskId,
|
||||
|
|
@ -190,4 +252,5 @@
|
|||
where task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
||||
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
|
||||
import com.bonus.sgzb.material.service.IRepairAuditDetailsService;
|
||||
import com.bonus.sgzb.material.vo.RepairAuditDetailsVO;
|
||||
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
||||
import com.bonus.sgzb.material.vo.ScrapAudit;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -51,6 +52,19 @@ public class RepairAuditDetailsController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出修试审核任务列表
|
||||
*/
|
||||
@RequiresPermissions("domain:details:export")
|
||||
@Log(title = "修试审核任务列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RepairAuditDetails bean)
|
||||
{
|
||||
List<RepairAuditDetailsVO> list = repairAuditDetailsService.exportRepairQuestList(bean);
|
||||
ExcelUtil<RepairAuditDetailsVO> util = new ExcelUtil<RepairAuditDetailsVO>(RepairAuditDetailsVO.class);
|
||||
util.exportExcel(response, list, "修试审核任务列表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看修饰审核任务详细列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package com.bonus.sgzb.material.controller;
|
|||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
||||
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
|
||||
import com.bonus.sgzb.material.service.IScrapApplyDetailsService;
|
||||
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
||||
|
|
@ -52,6 +53,19 @@ public class ScrapApplyDetailsController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出报废任务列表
|
||||
*/
|
||||
@RequiresPermissions("domain:details:export")
|
||||
@Log(title = "报废任务列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScrapApplyDetails bean)
|
||||
{
|
||||
List<ScrapApplyDetailsVO> list = scrapApplyDetailsService.exportScrapApplyDetailsList(bean);
|
||||
ExcelUtil<ScrapApplyDetailsVO> util = new ExcelUtil<ScrapApplyDetailsVO>(ScrapApplyDetailsVO.class);
|
||||
util.exportExcel(response, list, "报废任务列表");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查看报废任务详细列表
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
||||
import com.bonus.sgzb.material.vo.RepairAuditDetailsVO;
|
||||
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
|
@ -69,4 +70,6 @@ public interface RepairAuditDetailsMapper
|
|||
|
||||
String selectTypeNameByTaskId(Long taskId);
|
||||
|
||||
List<RepairAuditDetailsVO> exportRepairQuestList(RepairAuditDetails bean);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,4 +70,6 @@ public interface ScrapApplyDetailsMapper
|
|||
int updateMachine(Long maId);
|
||||
|
||||
String selectTypeNameByTaskId(Long taskId);
|
||||
|
||||
List<ScrapApplyDetailsVO> exportScrapApplyDetailsList(ScrapApplyDetails bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.sgzb.material.service;
|
||||
|
||||
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
||||
import com.bonus.sgzb.material.vo.RepairAuditDetailsVO;
|
||||
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
||||
import com.bonus.sgzb.material.vo.ScrapAudit;
|
||||
|
||||
|
|
@ -67,4 +68,7 @@ public interface IRepairAuditDetailsService
|
|||
List<RepairAuditDetails> getRepairAuditList(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
int auditRepair(ScrapAudit scrapAudit) throws Exception;
|
||||
|
||||
List<RepairAuditDetailsVO> exportRepairQuestList(RepairAuditDetails bean);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,4 +66,5 @@ public interface IScrapApplyDetailsService
|
|||
|
||||
int auditScrap(ScrapAudit scrapAudit) throws Exception;
|
||||
|
||||
List<ScrapApplyDetailsVO> exportScrapApplyDetailsList(ScrapApplyDetails bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
|||
import com.bonus.sgzb.material.domain.*;
|
||||
import com.bonus.sgzb.material.mapper.*;
|
||||
import com.bonus.sgzb.material.service.IRepairAuditDetailsService;
|
||||
import com.bonus.sgzb.material.vo.RepairAuditDetailsVO;
|
||||
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
||||
import com.bonus.sgzb.material.vo.ScrapAudit;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -135,6 +136,11 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
return repairQuestList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairAuditDetailsVO> exportRepairQuestList(RepairAuditDetails bean) {
|
||||
return repairAuditDetailsMapper.exportRepairQuestList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param repairAuditDetails
|
||||
|
|
@ -254,6 +260,8 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 采购单号编码生成规则
|
||||
private String purchaseCodeRule(String code,Integer taskType) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||
|
|
|
|||
|
|
@ -49,6 +49,11 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
|||
return scrapApplyDetailsMapper.selectScrapApplyDetailsById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ScrapApplyDetailsVO> exportScrapApplyDetailsList(ScrapApplyDetails bean) {
|
||||
return scrapApplyDetailsMapper.exportScrapApplyDetailsList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询报废任务详细scrap_apply_details列表
|
||||
*
|
||||
|
|
@ -164,4 +169,6 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService
|
|||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,79 @@
|
|||
package com.bonus.sgzb.material.vo;
|
||||
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class RepairAuditDetailsVO {
|
||||
// 任务id
|
||||
private Long taskId;
|
||||
|
||||
// 报废单号
|
||||
@Excel(name = "修饰审核单号",sort = 1)
|
||||
private String scrapNum;
|
||||
|
||||
// 单位名称
|
||||
@Excel(name = "单位名称",sort = 2)
|
||||
private String unitName;
|
||||
|
||||
// 工程名称
|
||||
@Excel(name = "工程名称",sort = 3)
|
||||
private String projectName;
|
||||
|
||||
//任务创建人
|
||||
@Excel(name = "任务创建人",sort = 4)
|
||||
private String createBy;
|
||||
|
||||
// 机具类型
|
||||
private String itemType;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "任务创建时间",sort = 5)
|
||||
private Date createTime;
|
||||
|
||||
// 维修单号
|
||||
@Excel(name = "维修单号",sort = 6)
|
||||
private String repairNum;
|
||||
|
||||
// 审核状态
|
||||
private Integer taskStatus;
|
||||
|
||||
// 审核状态
|
||||
@Excel(name = "审核状态",sort = 7)
|
||||
private String taskStatusName;
|
||||
|
||||
// 不通过原因
|
||||
@Excel(name = "不通过原因",sort = 8)
|
||||
private String remark;
|
||||
|
||||
// 机具类型
|
||||
@Excel(name = "机具类型",sort = 9)
|
||||
private String type;
|
||||
|
||||
// 规格型号
|
||||
@Excel(name = "规格型号",sort = 10)
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "机具编号")
|
||||
@Excel(name = "机具编号",sort = 11)
|
||||
private String maCode;
|
||||
|
||||
/** 维修总量 */
|
||||
@Excel(name = "维修总量")
|
||||
private BigDecimal repairNum2;
|
||||
|
||||
/** 维修数量 */
|
||||
@Excel(name = "维修数量")
|
||||
private BigDecimal repairedNum2;
|
||||
|
||||
/** 报废数量 */
|
||||
@Excel(name = "报废数量")
|
||||
private BigDecimal scrapNum2;
|
||||
}
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
package com.bonus.sgzb.material.vo;
|
||||
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
|
|
@ -10,37 +13,60 @@ public class ScrapApplyDetailsVO {
|
|||
// 任务id
|
||||
private Long taskId;
|
||||
|
||||
// 报废单号
|
||||
// 报废审核单号
|
||||
@Excel(name = "报废审核单号",sort = 1)
|
||||
private String scrapNum;
|
||||
|
||||
// 单位名称
|
||||
@Excel(name = "单位名称",sort = 2)
|
||||
private String unitName;
|
||||
|
||||
// 工程名称
|
||||
@Excel(name = "工程名称",sort = 3)
|
||||
private String projectName;
|
||||
|
||||
//任务创建人
|
||||
@Excel(name = "任务创建人",sort = 4)
|
||||
private String createBy;
|
||||
|
||||
// 机具类型
|
||||
private String itemType;
|
||||
|
||||
//任务创建人
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "任务创建时间",sort = 5)
|
||||
private Date createTime;
|
||||
|
||||
// 维修单号
|
||||
@Excel(name = "维修单号",sort = 6)
|
||||
private String repairNum;
|
||||
|
||||
// 审核状态
|
||||
private Integer taskStatus;
|
||||
|
||||
// 审核状态
|
||||
@Excel(name = "审核状态",sort = 7)
|
||||
private String taskStatusName;
|
||||
|
||||
// 不通过原因
|
||||
@Excel(name = "不通过原因",sort = 8)
|
||||
private String remark;
|
||||
|
||||
// 机具类型
|
||||
@Excel(name = "机具类型",sort = 9)
|
||||
private String type;
|
||||
|
||||
// 规格型号
|
||||
@Excel(name = "规格型号",sort = 10)
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "机具编号")
|
||||
@Excel(name = "机具编号",sort = 11)
|
||||
private String maCode;
|
||||
|
||||
|
||||
/** 报废数量 */
|
||||
@Excel(name = "报废数量")
|
||||
private BigDecimal scrapNum2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,6 +154,64 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by tk.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="exportRepairQuestList" resultType="com.bonus.sgzb.material.vo.RepairAuditDetailsVO">
|
||||
SELECT DISTINCT
|
||||
tk.task_id taskId,
|
||||
tk.CODE scrapNum,
|
||||
tk.task_status taskStatus,
|
||||
dic.NAME taskStatusName,
|
||||
bui.unit_name unitName,
|
||||
bpl.lot_name projectName,
|
||||
tk.create_by createBy,
|
||||
tk.create_time createTime,
|
||||
tk.remark,
|
||||
tk.CODE repairNum,
|
||||
mt1.type_name as type,
|
||||
mt.type_name as typeName,
|
||||
mma.ma_code as maCode,
|
||||
rad.repair_num as repairNum2,
|
||||
rad.repaired_num as repairedNum2,
|
||||
rad.scrap_num as scrapNum2
|
||||
FROM
|
||||
tm_task tk
|
||||
LEFT JOIN tm_task_agreement tta ON tk.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_project_lot bpl ON bai.project_id = bpl.lot_id
|
||||
LEFT JOIN bm_unit_info bui ON bai.unit_id = bui.unit_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
id,
|
||||
p_id,
|
||||
NAME
|
||||
FROM
|
||||
sys_dic
|
||||
WHERE
|
||||
p_id IN ( SELECT id FROM sys_dic WHERE VALUE = 'ws_shenhe' )) dic ON tk.task_status = dic.id
|
||||
LEFT JOIN repair_audit_details rad ON tk.task_id = rad.task_id
|
||||
LEFT JOIN ma_type mt ON rad.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
left join ma_machine mma on rad.ma_id= mma.ma_id
|
||||
WHERE
|
||||
tk.task_type = 45
|
||||
<if test="backUnit != null">
|
||||
and bui.unit_id = #{backUnit}
|
||||
</if>
|
||||
<if test="taskStatus != null">
|
||||
and tk.task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="backPro != null">
|
||||
and bpl.lot_id = #{backPro}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and mt1.type_id = #{type}
|
||||
</if>
|
||||
<if test="backCode != null">
|
||||
and tk.code = #{backCode}
|
||||
</if>
|
||||
ORDER BY
|
||||
tk.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="selectRepairAuditDetailsByTaskId" resultMap="RepairAuditDetailsResult">
|
||||
<include refid="selectRepairAuditDetailsVo"/>
|
||||
where task_id = #{taskId}
|
||||
|
|
@ -169,4 +227,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
) t
|
||||
GROUP BY task_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
@ -61,6 +61,62 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and tk.code = #{backCode}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="exportScrapApplyDetailsList" resultType="com.bonus.sgzb.material.vo.ScrapApplyDetailsVO">
|
||||
SELECT
|
||||
tk.CODE scrapNum,
|
||||
tk.task_status taskStatus,
|
||||
dic.NAME taskStatusName,
|
||||
bui.unit_name unitName,
|
||||
bpl.lot_name projectName,
|
||||
tk.create_by createBy,
|
||||
tk.create_time createTime,
|
||||
tk.remark,
|
||||
tk1.CODE repairNum,
|
||||
tk.task_id taskId,
|
||||
mt1.type_name AS type,
|
||||
mt.type_name AS typeName,
|
||||
mma.ma_code AS maCode,
|
||||
sad.scrap_num AS scrapNum2
|
||||
FROM
|
||||
tm_task tk
|
||||
LEFT JOIN tm_task_agreement tta ON tk.task_id = tta.task_id
|
||||
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
|
||||
LEFT JOIN bm_project_lot bpl ON bai.project_id = bpl.lot_id
|
||||
LEFT JOIN bm_unit_info bui ON bai.unit_id = bui.unit_id
|
||||
LEFT JOIN scrap_apply_details sad ON tk.task_id = sad.task_id
|
||||
LEFT JOIN tm_task tk1 ON sad.parent_id = tk1.task_id
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
id,
|
||||
p_id,
|
||||
NAME
|
||||
FROM
|
||||
sys_dic
|
||||
WHERE
|
||||
p_id IN ( SELECT id FROM sys_dic WHERE VALUE = 'bf_task' )) dic ON tk.task_status = dic.id
|
||||
LEFT JOIN ma_type mt ON sad.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt1 ON mt.parent_id = mt1.type_id
|
||||
left join ma_machine mma on sad.ma_id= mma.ma_id
|
||||
WHERE
|
||||
sad.scrap_source IN ( '1', '2' )
|
||||
AND tk.task_type = 57
|
||||
<if test="backUnit != null">
|
||||
and bui.unit_id = #{backUnit}
|
||||
</if>
|
||||
<if test="repairStatus != null">
|
||||
and tk.task_status = #{repairStatus}
|
||||
</if>
|
||||
<if test="backPro != null">
|
||||
and bpl.lot_id = #{backPro}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
and mt1.type_id = #{type}
|
||||
</if>
|
||||
<if test="backCode != null">
|
||||
and tk.code = #{backCode}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectScrapApplyDetailsById" parameterType="Long" resultMap="ScrapApplyDetailsResult">
|
||||
<include refid="selectScrapApplyDetailsVo"/>
|
||||
|
|
@ -180,4 +236,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
) t
|
||||
GROUP BY task_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue