修试入库
This commit is contained in:
parent
8d7e961f80
commit
308d8e343c
|
|
@ -9,10 +9,7 @@ import com.bonus.sgzb.material.domain.RepairTestInputVo;
|
||||||
import com.bonus.sgzb.material.service.RepairTestInputService;
|
import com.bonus.sgzb.material.service.RepairTestInputService;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -29,16 +26,16 @@ public class RepairTestInputController extends BaseController {
|
||||||
private RepairTestInputService service;
|
private RepairTestInputService service;
|
||||||
|
|
||||||
@ApiOperation(value = "获取修试后入库列表")
|
@ApiOperation(value = "获取修试后入库列表")
|
||||||
@PostMapping("getRepairedList")
|
@GetMapping("getRepairedList")
|
||||||
public TableDataInfo getRepairedList(@Validated @RequestBody RepairTestInputDto dto){
|
public TableDataInfo getRepairedList(RepairTestInputDto dto){
|
||||||
startPage();
|
startPage();
|
||||||
List<RepairTestInputVo> list = service.getRepairedList(dto);
|
List<RepairTestInputVo> list = service.getRepairedList(dto);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "获取修试后入库列表-详情")
|
@ApiOperation(value = "获取修试后入库列表-详情")
|
||||||
@PostMapping("getRepairedDetailList")
|
@GetMapping("getRepairedDetailList")
|
||||||
public TableDataInfo getRepairedDetailList(@Validated @RequestBody RepairTestInputDto dto){
|
public TableDataInfo getRepairedDetailList(RepairTestInputDto dto){
|
||||||
startPage();
|
startPage();
|
||||||
List<RepairTestInputDetailVo> list = service.getRepairedDetailList(dto);
|
List<RepairTestInputDetailVo> list = service.getRepairedDetailList(dto);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
|
|
|
||||||
|
|
@ -18,4 +18,10 @@ public class RepairTestInputDto {
|
||||||
/** 状态*/
|
/** 状态*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
/** 设备类型*/
|
||||||
|
private String deviceTypeId;
|
||||||
|
|
||||||
|
/** 规格型号*/
|
||||||
|
private String typeId;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,9 +58,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
|
||||||
<!--获取修试后入库列表-->
|
<!--获取修试后入库列表-->
|
||||||
<select id="getRepairedList" resultType="com.bonus.sgzb.material.domain.RepairTestInputVo">
|
<select id="getRepairedList" resultType="com.bonus.sgzb.material.domain.RepairTestInputVo">
|
||||||
|
SELECT b.id,
|
||||||
|
b.repairCode,
|
||||||
|
b.maTypeName,
|
||||||
|
b.wxName,
|
||||||
|
b.wxTime,
|
||||||
|
b.taskStatus
|
||||||
|
FROM (
|
||||||
SELECT ANY_VALUE(rid.task_id) AS id,
|
SELECT ANY_VALUE(rid.task_id) AS id,
|
||||||
ANY_VALUE(tt2.`code`) AS repairCode,
|
ANY_VALUE(tt2.`code`) AS repairCode,
|
||||||
ANY_VALUE(GROUP_CONCAT(a.typeName)) AS maTypeName,
|
ANY_VALUE(GROUP_CONCAT(DISTINCT a.typeName)) AS maTypeName,
|
||||||
|
ANY_VALUE(GROUP_CONCAT(DISTINCT a.type_id)) AS type_id,
|
||||||
ANY_VALUE(tt2.create_by) AS wxName,
|
ANY_VALUE(tt2.create_by) AS wxName,
|
||||||
ANY_VALUE(tt2.create_time) AS wxTime,
|
ANY_VALUE(tt2.create_time) AS wxTime,
|
||||||
ANY_VALUE(IFNULL(sd.`name`,'入库进行中')) AS taskStatus
|
ANY_VALUE(IFNULL(sd.`name`,'入库进行中')) AS taskStatus
|
||||||
|
|
@ -69,7 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN sys_dic sd ON tt.task_status = sd.id
|
LEFT JOIN sys_dic sd ON tt.task_status = sd.id
|
||||||
LEFT JOIN tm_task tt2 ON rid.repair_id = tt2.task_id
|
LEFT JOIN tm_task tt2 ON rid.repair_id = tt2.task_id
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT mt.type_id,mt3.type_name AS typeName,mt.manage_type
|
SELECT mt2.type_id,mt2.type_name AS typeName,mt.manage_type
|
||||||
FROM ma_type mt
|
FROM ma_type mt
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||||
|
|
@ -86,6 +94,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</where>
|
</where>
|
||||||
GROUP BY rid.task_id
|
GROUP BY rid.task_id
|
||||||
ORDER BY tt.create_time DESC
|
ORDER BY tt.create_time DESC
|
||||||
|
) b
|
||||||
|
<where>
|
||||||
|
<if test="deviceTypeId!=null and deviceTypeId!=''">
|
||||||
|
INSTR(b.type_id,#{deviceTypeId}) > 0
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<!--获取修试后入库-详情列表-->
|
<!--获取修试后入库-详情列表-->
|
||||||
<select id="getRepairedDetailList" resultType="com.bonus.sgzb.material.domain.RepairTestInputDetailVo">
|
<select id="getRepairedDetailList" resultType="com.bonus.sgzb.material.domain.RepairTestInputDetailVo">
|
||||||
|
|
@ -104,22 +118,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
FROM repair_input_details rid
|
FROM repair_input_details rid
|
||||||
LEFT JOIN ma_machine mm ON rid.ma_id = mm.ma_id
|
LEFT JOIN ma_machine mm ON rid.ma_id = mm.ma_id
|
||||||
LEFT JOIN (
|
LEFT JOIN (
|
||||||
SELECT mt.type_id,mt.type_name AS typeName,mt2.type_name AS typeName2,mt.manage_type
|
SELECT mt.type_id AS typeId,mt2.type_id AS typeId2,mt.type_name AS typeName,mt2.type_name AS typeName2,mt.manage_type
|
||||||
FROM ma_type mt
|
FROM ma_type mt
|
||||||
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
LEFT JOIN ma_type mt2 ON mt2.type_id = mt.parent_id AND mt2.`level` = '3'
|
||||||
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
LEFT JOIN ma_type mt3 ON mt2.parent_id = mt3.type_id AND mt3.`level` = '2'
|
||||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||||
WHERE mt.`level` = '4'
|
WHERE mt.`level` = '4'
|
||||||
)a ON rid.type_id = a.type_id
|
)a ON rid.type_id = a.typeId
|
||||||
WHERE rid.task_id = #{taskId}
|
WHERE rid.task_id = #{taskId}
|
||||||
<if test="keyWord!=null and keyWord!=''">
|
<if test="keyWord!=null and keyWord!=''">
|
||||||
AND (
|
AND (
|
||||||
INSTR(a.typeName,#{keyWord}) > 0 OR
|
INSTR(rid.update_by,#{keyWord}) > 0 OR
|
||||||
INSTR(a.typeName2,#{keyWord}) > 0
|
INSTR(mm.ma_code,#{keyWord}) > 0
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
<if test="status!=null and status!=''">
|
<if test="deviceTypeId!=null and deviceTypeId!=''">
|
||||||
AND rid.status = #{status}
|
AND a.typeId2 = #{deviceTypeId}
|
||||||
|
</if>
|
||||||
|
<if test="typeId!=null and typeId!=''">
|
||||||
|
AND a.typeId = #{typeId}
|
||||||
</if>
|
</if>
|
||||||
ORDER BY rid.create_time DESC
|
ORDER BY rid.create_time DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue