修试管理代码提交
This commit is contained in:
parent
4d4dfd55b9
commit
a954cbdb30
|
|
@ -46,7 +46,7 @@ public class RepairController extends BaseController {
|
|||
/**
|
||||
* 导出维修任务列表
|
||||
*/
|
||||
@RequiresPermissions("domain:details:export")
|
||||
//@RequiresPermissions("domain:details:export")
|
||||
@Log(title = "导出维修任务列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RepairTask bean)
|
||||
|
|
|
|||
|
|
@ -98,7 +98,7 @@
|
|||
AND bui.unit_id = #{backUnit}
|
||||
</if>
|
||||
<if test="backPro != null and backPro != ''">
|
||||
AND bpi.pro_id = #{backPro}
|
||||
AND bpi.lot_id = #{backPro}
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND mt2.type_id = #{type}
|
||||
|
|
@ -200,7 +200,9 @@
|
|||
where rad.task_id = #{taskId}
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, mm.ma_code) > 0
|
||||
or locate(#{keyword}, su.user_name) > 0)
|
||||
or locate(#{keyword}, su.user_name) > 0
|
||||
or locate(#{keyword}, mt2.type_name) > 0
|
||||
or locate(#{keyword}, mt.type_name) > 0)
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND mt.type_id = #{type}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.sgzb.material.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
||||
|
|
@ -48,6 +49,14 @@ public class RepairAuditDetailsController extends BaseController
|
|||
public TableDataInfo questList(RepairAuditDetails repairAuditDetails)
|
||||
{
|
||||
startPage();
|
||||
Map<String, Object> params = repairAuditDetails.getParams();
|
||||
if (!params.isEmpty()){
|
||||
String beginTime = (String) params.get("beginTime");
|
||||
String endTime = (String) params.get("endTime");
|
||||
params.put("beginTime", beginTime+" 00:00:00");
|
||||
params.put("endTime", endTime+" 23:59:59");
|
||||
repairAuditDetails.setParams(params);
|
||||
}
|
||||
List<ScrapApplyDetailsVO> list = repairAuditDetailsService.selectRepairQuestList(repairAuditDetails);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
@ -55,11 +64,19 @@ public class RepairAuditDetailsController extends BaseController
|
|||
/**
|
||||
* 导出修试审核任务列表
|
||||
*/
|
||||
@RequiresPermissions("domain:details:export")
|
||||
//@RequiresPermissions("domain:details:export")
|
||||
@Log(title = "导出修试审核任务列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RepairAuditDetails bean)
|
||||
{
|
||||
Map<String, Object> params = bean.getParams();
|
||||
if (!params.isEmpty()){
|
||||
String beginTime = (String) params.get("beginTime");
|
||||
String endTime = (String) params.get("endTime");
|
||||
params.put("beginTime", beginTime+" 00:00:00");
|
||||
params.put("endTime", endTime+" 23:59:59");
|
||||
bean.setParams(params);
|
||||
}
|
||||
List<RepairAuditDetailsVO> list = repairAuditDetailsService.exportRepairQuestList(bean);
|
||||
ExcelUtil<RepairAuditDetailsVO> util = new ExcelUtil<RepairAuditDetailsVO>(RepairAuditDetailsVO.class);
|
||||
util.exportExcel(response, list, "修试审核任务列表");
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.bonus.sgzb.material.controller;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
||||
|
|
@ -49,6 +50,14 @@ public class ScrapApplyDetailsController extends BaseController
|
|||
public TableDataInfo list(ScrapApplyDetails scrapApplyDetails)
|
||||
{
|
||||
startPage();
|
||||
Map<String, Object> params = scrapApplyDetails.getParams();
|
||||
if (!params.isEmpty()){
|
||||
String beginTime = (String) params.get("beginTime");
|
||||
String endTime = (String) params.get("endTime");
|
||||
params.put("beginTime", beginTime+" 00:00:00");
|
||||
params.put("endTime", endTime+" 23:59:59");
|
||||
scrapApplyDetails.setParams(params);
|
||||
}
|
||||
List<ScrapApplyDetailsVO> list = scrapApplyDetailsService.selectScrapApplyDetailsList(scrapApplyDetails);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
@ -56,11 +65,19 @@ public class ScrapApplyDetailsController extends BaseController
|
|||
/**
|
||||
* 导出报废任务列表
|
||||
*/
|
||||
@RequiresPermissions("domain:details:export")
|
||||
//@RequiresPermissions("domain:details:export")
|
||||
@Log(title = "导出报废任务列表", businessType = BusinessType.EXPORT)
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, ScrapApplyDetails bean)
|
||||
{
|
||||
Map<String, Object> params = bean.getParams();
|
||||
if (!params.isEmpty()){
|
||||
String beginTime = (String) params.get("beginTime");
|
||||
String endTime = (String) params.get("endTime");
|
||||
params.put("beginTime", beginTime+" 00:00:00");
|
||||
params.put("endTime", endTime+" 23:59:59");
|
||||
bean.setParams(params);
|
||||
}
|
||||
List<ScrapApplyDetailsVO> list = scrapApplyDetailsService.exportScrapApplyDetailsList(bean);
|
||||
ExcelUtil<ScrapApplyDetailsVO> util = new ExcelUtil<ScrapApplyDetailsVO>(ScrapApplyDetailsVO.class);
|
||||
util.exportExcel(response, list, "报废任务列表");
|
||||
|
|
|
|||
|
|
@ -86,7 +86,6 @@ public class RepairAuditDetails extends BaseEntity
|
|||
@ApiModelProperty(value = "试检状态")
|
||||
private String taskStatus;
|
||||
|
||||
|
||||
// 传入参数
|
||||
@ApiModelProperty(value = "单位id")
|
||||
private Integer backUnit;
|
||||
|
|
@ -95,7 +94,9 @@ public class RepairAuditDetails extends BaseEntity
|
|||
@ApiModelProperty(value = "工机具类型id")
|
||||
private Integer type;
|
||||
@ApiModelProperty(value = "维修单号")
|
||||
private Integer backCode;
|
||||
private String backCode;
|
||||
private String keyword;
|
||||
private String typeName;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
|
|
@ -263,13 +264,6 @@ public class RepairAuditDetails extends BaseEntity
|
|||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getBackCode() {
|
||||
return backCode;
|
||||
}
|
||||
|
||||
public void setBackCode(Integer backCode) {
|
||||
this.backCode = backCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
|
|
|||
|
|
@ -101,10 +101,13 @@ public class ScrapApplyDetails extends BaseEntity
|
|||
@ApiModelProperty(value = "工机具类型id")
|
||||
private Integer type;
|
||||
@ApiModelProperty(value = "维修单号")
|
||||
private Integer backCode;
|
||||
private String backCode;
|
||||
|
||||
@ApiModelProperty(value = "数据状态")
|
||||
private Integer repairStatus;
|
||||
|
||||
private String keyword;
|
||||
private String typeName;
|
||||
private Long createById;
|
||||
|
||||
|
||||
|
|
@ -292,14 +295,6 @@ public class ScrapApplyDetails extends BaseEntity
|
|||
this.type = type;
|
||||
}
|
||||
|
||||
public Integer getBackCode() {
|
||||
return backCode;
|
||||
}
|
||||
|
||||
public void setBackCode(Integer backCode) {
|
||||
this.backCode = backCode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
|
|
|
|||
|
|
@ -36,6 +36,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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 rad.task_id = #{taskId}
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, mma.ma_code) > 0
|
||||
or locate(#{keyword}, mt.type_name) > 0
|
||||
or locate(#{keyword}, mt1.type_name) > 0)
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND mt.type_id = #{type}
|
||||
</if>
|
||||
<if test="typeName != null and typeName != ''">
|
||||
AND mt1.type_id = #{typeName}
|
||||
</if>
|
||||
order by rad.create_time desc
|
||||
</select>
|
||||
|
||||
|
|
@ -124,33 +135,61 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</delete>
|
||||
|
||||
<select id="selectRepairQuestList" resultType="com.bonus.sgzb.material.vo.ScrapApplyDetailsVO">
|
||||
select DISTINCT tk.task_id taskId,tk.code scrapNum,tk.task_status taskStatus, dic.name taskStatusName, bui.unit_name unitName,bpl.lot_name projectName,
|
||||
su.user_name createBy, tk.create_time createTime, tk.remark ,tk.code repairNum
|
||||
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 sys_user su on su.user_id = tk.create_by
|
||||
where tk.task_type = 45
|
||||
<if test="backUnit != null">
|
||||
SELECT DISTINCT
|
||||
tk.task_id taskId,
|
||||
tk.CODE scrapNum,
|
||||
tk.task_status taskStatus,
|
||||
dic.NAME taskStatusName,
|
||||
bui.unit_name unitName,
|
||||
bpl.lot_name projectName,
|
||||
su.user_name createBy,
|
||||
tk.create_time createTime,
|
||||
tk.remark,
|
||||
tk.CODE repairNum
|
||||
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 sys_user su ON su.user_id = tk.create_by
|
||||
WHERE
|
||||
tk.task_type = 45
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, su.user_name) > 0
|
||||
or locate(#{keyword}, tk.CODE) > 0
|
||||
or locate(#{keyword}, bui.unit_name) > 0
|
||||
or locate(#{keyword}, bpl.lot_name) > 0)
|
||||
</if>
|
||||
<if test="backUnit != null and backUnit != ''">
|
||||
and bui.unit_id = #{backUnit}
|
||||
</if>
|
||||
<if test="taskStatus != null">
|
||||
<if test="taskStatus != null and taskStatus != ''">
|
||||
and tk.task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="backPro != null">
|
||||
<if test="backPro != null and backPro != ''">
|
||||
and bpl.lot_id = #{backPro}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
<if test="type != null and type != ''">
|
||||
and mt1.type_id = #{type}
|
||||
</if>
|
||||
<if test="backCode != null">
|
||||
and tk.code = #{backCode}
|
||||
<if test="backCode != null and backCode != ''">
|
||||
and locate(#{backCode}, tk.code) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
|
||||
and tk.create_time between #{params.beginTime} and #{params.endTime}
|
||||
</if>
|
||||
order by tk.create_time desc
|
||||
</select>
|
||||
|
|
@ -194,20 +233,29 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join ma_machine mma on rad.ma_id= mma.ma_id
|
||||
WHERE
|
||||
tk.task_type = 45
|
||||
<if test="backUnit != null">
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, su.user_name) > 0
|
||||
or locate(#{keyword}, tk.CODE) > 0
|
||||
or locate(#{keyword}, bui.unit_name) > 0
|
||||
or locate(#{keyword}, bpl.lot_name) > 0)
|
||||
</if>
|
||||
<if test="backUnit != null and backUnit != ''">
|
||||
and bui.unit_id = #{backUnit}
|
||||
</if>
|
||||
<if test="taskStatus != null">
|
||||
<if test="taskStatus != null and taskStatus != ''">
|
||||
and tk.task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="backPro != null">
|
||||
<if test="backPro != null and backPro != ''">
|
||||
and bpl.lot_id = #{backPro}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
<if test="type != null and type != ''">
|
||||
and mt1.type_id = #{type}
|
||||
</if>
|
||||
<if test="backCode != null">
|
||||
and tk.code = #{backCode}
|
||||
<if test="backCode != null and backCode != ''">
|
||||
and locate(#{backCode}, tk.code) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
|
||||
and tk.create_time between #{params.beginTime} and #{params.endTime}
|
||||
</if>
|
||||
ORDER BY
|
||||
tk.create_time DESC
|
||||
|
|
|
|||
|
|
@ -67,20 +67,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
sad.scrap_source IN ( '1', '2' )
|
||||
AND tk.task_type = 57
|
||||
<if test="backUnit != null">
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, tk.create_by) > 0
|
||||
or locate(#{keyword}, tk.CODE) > 0
|
||||
or locate(#{keyword}, bui.unit_name) > 0
|
||||
or locate(#{keyword}, bpl.lot_name) > 0
|
||||
or locate(#{keyword}, tk1.CODE) > 0)
|
||||
</if>
|
||||
<if test="backUnit != null and backUnit != ''">
|
||||
and bui.unit_id = #{backUnit}
|
||||
</if>
|
||||
<if test="repairStatus != null">
|
||||
<if test="repairStatus != null and repairStatus != ''">
|
||||
and tk.task_status = #{repairStatus}
|
||||
</if>
|
||||
<if test="backPro != null">
|
||||
<if test="backPro != null and backPro != ''">
|
||||
and bpl.lot_id = #{backPro}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
<if test="type != null and type != ''">
|
||||
and mt1.type_id = #{type}
|
||||
</if>
|
||||
<if test="backCode != null">
|
||||
and tk.code = #{backCode}
|
||||
<if test="backCode != null and backCode != ''">
|
||||
and locate(#{backCode}, tk.code) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
|
||||
and tk.create_time between #{params.beginTime} and #{params.endTime}
|
||||
</if>
|
||||
GROUP BY tk.CODE
|
||||
order by tk.create_time desc
|
||||
|
|
@ -125,21 +135,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
sad.scrap_source IN ( '1', '2' )
|
||||
AND tk.task_type = 57
|
||||
<if test="backUnit != null">
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, tk.create_by) > 0
|
||||
or locate(#{keyword}, tk.CODE) > 0
|
||||
or locate(#{keyword}, bui.unit_name) > 0
|
||||
or locate(#{keyword}, bpl.lot_name) > 0
|
||||
or locate(#{keyword}, tk1.CODE) > 0)
|
||||
</if>
|
||||
<if test="backUnit != null and backUnit != ''">
|
||||
and bui.unit_id = #{backUnit}
|
||||
</if>
|
||||
<if test="repairStatus != null">
|
||||
<if test="repairStatus != null and repairStatus != ''">
|
||||
and tk.task_status = #{repairStatus}
|
||||
</if>
|
||||
<if test="backPro != null">
|
||||
<if test="backPro != null and backPro != ''">
|
||||
and bpl.lot_id = #{backPro}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
<if test="type != null and type != ''">
|
||||
and mt1.type_id = #{type}
|
||||
</if>
|
||||
<if test="backCode != null">
|
||||
and tk.code = #{backCode}
|
||||
<if test="backCode != null and backCode != ''">
|
||||
and locate(#{backCode}, tk.code) > 0
|
||||
</if>
|
||||
<if test="params.beginTime != null and params.beginTime != '' and params.endTime != null and params.endTime != ''">
|
||||
and tk.create_time between #{params.beginTime} and #{params.endTime}
|
||||
</if>
|
||||
GROUP BY tk.CODE
|
||||
order by tk.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectScrapApplyDetailsById" parameterType="Long" resultMap="ScrapApplyDetailsResult">
|
||||
|
|
@ -241,6 +263,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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.task_id = #{taskId}
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, mma.ma_code) > 0
|
||||
or locate(#{keyword}, mt.type_name) > 0
|
||||
or locate(#{keyword}, mt1.type_name) > 0)
|
||||
</if>
|
||||
<if test="type != null and type != ''">
|
||||
AND mt.type_id = #{type}
|
||||
</if>
|
||||
<if test="typeName != null and typeName != ''">
|
||||
AND mt1.type_id = #{typeName}
|
||||
</if>
|
||||
order by sad.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="selectScrapDetailsByTaskId" resultMap="ScrapApplyDetailsResult">
|
||||
|
|
|
|||
Loading…
Reference in New Issue