Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
183409d1e6
|
|
@ -185,10 +185,19 @@ public class RepairController extends BaseController {
|
|||
|
||||
@ApiOperation(value = "获取修试后入库列表")
|
||||
@GetMapping("getRepairedList")
|
||||
@RequiresPermissions("warehousing:repair:list")
|
||||
//@RequiresPermissions("warehousing:repair:list")
|
||||
public TableDataInfo getRepairedList(RepairInputDetailsVo dto){
|
||||
startPage();
|
||||
List<RepairInputDetailsVo> list = service.getRepairedList(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取修试后入库列表-详情")
|
||||
@GetMapping("getRepairedDetailList")
|
||||
//@RequiresPermissions("warehousing:repair:list")
|
||||
public TableDataInfo getRepairedDetailList(RepairInputDetailsVo dto){
|
||||
startPage();
|
||||
List<RepairInputDetailsVo> list = service.getRepairedDetailList(dto);
|
||||
return getDataTable(list);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,8 @@ public interface RepairInputDetailsMapper {
|
|||
*/
|
||||
public int deleteRepairInputDetailsById(Long id);
|
||||
|
||||
public int deleteRepairInputDetailsByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 批量删除修试后入库
|
||||
*
|
||||
|
|
|
|||
|
|
@ -158,4 +158,6 @@ public interface RepairMapper {
|
|||
|
||||
|
||||
List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto);
|
||||
|
||||
List<RepairInputDetailsVo> getRepairedDetailList(RepairInputDetailsVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -82,4 +82,6 @@ public interface RepairService {
|
|||
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
||||
|
||||
List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto);
|
||||
|
||||
List<RepairInputDetailsVo> getRepairedDetailList(RepairInputDetailsVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -468,7 +468,8 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
if (CollectionUtils.isEmpty(repairAuditDetailsByQuery)) {
|
||||
return 0;
|
||||
}
|
||||
batchInsertRepairInputDetails(repairAuditDetailsByQuery);
|
||||
repairInputDetailsMapper.deleteRepairInputDetailsByTaskId(repairAuditDetails.get(0).getTaskId());
|
||||
batchInsertRepairInputDetails(repairAuditDetailsByQuery, repairAuditDetails.get(0).getStatus());
|
||||
try {
|
||||
List<Long> ids = repairAuditDetailsByQuery.stream()
|
||||
.filter(Objects::nonNull)
|
||||
|
|
@ -497,7 +498,8 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
if (ids.isEmpty()) {
|
||||
return 0;
|
||||
}
|
||||
batchInsertRepairInputDetails(repairAuditDetails);
|
||||
//repairInputDetailsMapper.deleteRepairInputDetailsByIds((Long[]) ids.toArray());
|
||||
batchInsertRepairInputDetails(repairAuditDetails, repairAuditDetails.get(0).getStatus());
|
||||
try {
|
||||
return repairAuditDetailsMapper.updateRepairAuditDetailsBatch(ids, String.valueOf(repairAuditDetails.get(0).getStatus()));
|
||||
} catch (Exception e) {
|
||||
|
|
@ -505,12 +507,13 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
}
|
||||
}
|
||||
|
||||
private void batchInsertRepairInputDetails(List<RepairAuditDetails> repairAuditDetailsByQuery) {
|
||||
private void batchInsertRepairInputDetails(List<RepairAuditDetails> repairAuditDetailsByQuery, String status) {
|
||||
List<RepairInputDetails> inputList = new ArrayList<>();
|
||||
for (RepairAuditDetails details : repairAuditDetailsByQuery) {
|
||||
RepairInputDetails inputVo = new RepairInputDetails();
|
||||
BeanUtils.copyProperties(details, inputVo);
|
||||
inputVo.setAuditId(details.getId());
|
||||
inputVo.setStatus(status);
|
||||
inputList.add(inputVo);
|
||||
}
|
||||
repairInputDetailsMapper.batchInsertRepairInputDetails(inputList);
|
||||
|
|
|
|||
|
|
@ -847,4 +847,15 @@ public class RepairServiceImpl implements RepairService {
|
|||
public List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto) {
|
||||
return repairMapper.getRepairedList(dto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairInputDetailsVo> getRepairedDetailList(RepairInputDetailsVo dto) {
|
||||
List<RepairInputDetailsVo> repairedDetailList = repairMapper.getRepairedDetailList(dto);
|
||||
// for (RepairInputDetailsVo repairTestInputDetailVo : repairedDetailList) {
|
||||
// List<String> userIds = repairMapper.selectKeepUser(repairTestInputDetailVo.getTypeId());
|
||||
// userIds.add("1");
|
||||
// repairTestInputDetailVo.setUserIds(userIds);
|
||||
// }
|
||||
return repairedDetailList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,6 +116,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
delete from repair_input_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepairInputDetailsByTaskId" parameterType="Long">
|
||||
delete from repair_input_details where task_id = #{taskId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepairInputDetailsByIds" parameterType="String">
|
||||
delete from repair_input_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
|
|
|
|||
|
|
@ -453,4 +453,44 @@
|
|||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<!--获取修试后入库-详情列表-->
|
||||
<select id="getRepairedDetailList" resultType="com.bonus.material.repair.domain.vo.RepairInputDetailsVo">
|
||||
SELECT rid.id,
|
||||
rid.ma_id AS maId,
|
||||
rid.type_id AS typeId,
|
||||
a.typeName,
|
||||
a.typeName2,
|
||||
rid.repair_num AS repairNum,
|
||||
a.manage_type AS manageType,
|
||||
mm.ma_code AS maCode,
|
||||
rid.update_by AS updateBy,
|
||||
rid.update_time AS updateTime,
|
||||
rid.remark,
|
||||
CASE rid.`status` WHEN '0' THEN '进行中' WHEN '1' THEN '已入库' WHEN '2' THEN '驳回' ELSE '进行中' END AS `status`
|
||||
FROM repair_input_details rid
|
||||
LEFT JOIN ma_machine mm ON rid.ma_id = mm.ma_id
|
||||
LEFT JOIN (
|
||||
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
|
||||
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 mt4 ON mt3.parent_id = mt4.type_id AND mt4.`level` = '1'
|
||||
WHERE mt.`level` = '4'
|
||||
)a ON rid.type_id = a.typeId
|
||||
WHERE rid.task_id = #{taskId}
|
||||
<if test="keyWord!=null and keyWord!=''">
|
||||
AND (
|
||||
INSTR(rid.update_by,#{keyWord}) > 0 OR
|
||||
INSTR(mm.ma_code,#{keyWord}) > 0
|
||||
)
|
||||
</if>
|
||||
<if test="deviceTypeId!=null and deviceTypeId!=''">
|
||||
AND a.typeId2 = #{deviceTypeId}
|
||||
</if>
|
||||
<if test="typeId!=null and typeId!=''">
|
||||
AND a.typeId = #{typeId}
|
||||
</if>
|
||||
ORDER BY rid.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue