Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
9322df8e42
|
|
@ -10,7 +10,7 @@ public enum TmTaskTypeEnum {
|
|||
TM_TASK_LEASE(2, "领料任务"),
|
||||
TM_TASK_BACK(3, "退料任务"),
|
||||
TM_TASK_REPAIR(4, "维修任务"),
|
||||
TM_TASK_REPAIR_STORAGE(5, "修试后入库任务"),
|
||||
TM_TASK_REPAIR_AUDIT(5, "修试后审核任务"),
|
||||
TM_TASK_SCRAP(6, "报废任务"),
|
||||
TM_TASK_SETTLEMENT(7, "结算任务"),
|
||||
TM_TASK_CHECK(8, "检验任务"),
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ public class RepairController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "获取维修单详情")
|
||||
@GetMapping("/getRepairDocumentInfo")
|
||||
public AjaxResult getRepairDocumentInfo(@NotBlank(message = "TaskId参数不能为空") String taskId) {
|
||||
public AjaxResult getRepairDocumentInfo(Long taskId) {
|
||||
return service.getRepairDocumentInfo(taskId);
|
||||
}
|
||||
|
||||
|
|
@ -136,12 +136,12 @@ public class RepairController extends BaseController {
|
|||
}
|
||||
|
||||
/**
|
||||
* 维修明细--批量审核--更新明细status
|
||||
* 维修明细--批量合格--更新明细status,以及repairedNum
|
||||
*/
|
||||
@ApiOperation(value = "维修明细更新status--批量")
|
||||
@PostMapping("/completeRepair")
|
||||
public AjaxResult completeRepair(@RequestBody ArrayList<Long> ids) {
|
||||
return toAjax(service.completeRepair(ids));
|
||||
@ApiOperation(value = "维修明细更新status--批量合格")
|
||||
@PostMapping("/batchQualified")
|
||||
public AjaxResult batchQualified(@RequestBody ArrayList<Long> ids) {
|
||||
return toAjax(service.batchQualified(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -186,7 +186,7 @@ public class RepairController extends BaseController {
|
|||
@ApiOperation(value = "获取修试后入库列表")
|
||||
@GetMapping("getRepairedList")
|
||||
@RequiresPermissions("warehousing:repair:list")
|
||||
public TableDataInfo getRepairedList(RepairInputDetails dto){
|
||||
public TableDataInfo getRepairedList(RepairInputDetailsVo dto){
|
||||
startPage();
|
||||
List<RepairInputDetailsVo> list = service.getRepairedList(dto);
|
||||
return getDataTable(list);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ public class RepairAuditDetails extends BaseEntity {
|
|||
private String taskStatus;
|
||||
|
||||
@ApiModelProperty(value = "任务类型编码")
|
||||
private Integer taskTypeCode = TmTaskTypeEnum.TM_TASK_REPAIR.getTaskTypeId();
|
||||
private Integer taskType;
|
||||
|
||||
/** 维修ID */
|
||||
@ApiModelProperty(value = "维修ID")
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ public class RepairTask {
|
|||
* 任务id
|
||||
*/
|
||||
@ApiModelProperty(value = "任务id")
|
||||
private String taskId;
|
||||
private Long taskId;
|
||||
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private Integer taskStatus;
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ public class RepairTaskDetails extends BaseEntity {
|
|||
* 任务ID
|
||||
*/
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private String taskId;
|
||||
private Long taskId;
|
||||
/**
|
||||
* 机具ID
|
||||
*/
|
||||
|
|
@ -98,7 +98,7 @@ public class RepairTaskDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
|
||||
public RepairTaskDetails(String taskId) {
|
||||
public RepairTaskDetails(Long taskId) {
|
||||
this.taskId = taskId;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -31,4 +31,11 @@ public class RepairInputDetailsVo {
|
|||
|
||||
/** 单位 */
|
||||
private String unitName;
|
||||
|
||||
/** 关键字*/
|
||||
private String keyWord;
|
||||
|
||||
/** 设备类型*/
|
||||
private String deviceTypeId;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -79,6 +79,8 @@ public interface RepairAuditDetailsMapper {
|
|||
*/
|
||||
int deleteRepairAuditDetailsById(Long id);
|
||||
|
||||
int deleteRepairAuditDetailsByTaskId(Long taskId);
|
||||
|
||||
/**
|
||||
* 批量删除修试审核详细
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.material.repair.mapper;
|
||||
|
||||
import com.bonus.material.repair.domain.*;
|
||||
import com.bonus.material.repair.domain.vo.RepairDeviceListVo;
|
||||
import com.bonus.material.repair.domain.vo.RepairDeviceVO;
|
||||
import com.bonus.material.repair.domain.vo.RepairInputDetailsVo;
|
||||
import com.bonus.system.api.domain.SysUser;
|
||||
|
|
@ -91,7 +90,7 @@ public interface RepairMapper {
|
|||
* @param ids 主键集合
|
||||
* @param userId 用户id
|
||||
*/
|
||||
int completeRepair(@Param("ids") ArrayList<Long> ids, @Param("userId") Long userId);
|
||||
int batchQualified(@Param("ids") ArrayList<Long> ids, @Param("userId") Long userId);
|
||||
|
||||
/**
|
||||
* 查询维修人员列表
|
||||
|
|
@ -158,5 +157,5 @@ public interface RepairMapper {
|
|||
BigDecimal selectPartPrice(Long partId);
|
||||
|
||||
|
||||
List<RepairInputDetailsVo> getRepairedList(RepairInputDetails dto);
|
||||
List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import com.bonus.material.repair.domain.RepairApplyRecord;
|
|||
import com.bonus.material.repair.domain.RepairInputDetails;
|
||||
import com.bonus.material.repair.domain.RepairTask;
|
||||
import com.bonus.material.repair.domain.RepairTaskDetails;
|
||||
import com.bonus.material.repair.domain.vo.RepairDeviceListVo;
|
||||
import com.bonus.material.repair.domain.vo.RepairDeviceSummaryVo;
|
||||
import com.bonus.material.repair.domain.vo.RepairDeviceVO;
|
||||
import com.bonus.material.repair.domain.vo.RepairInputDetailsVo;
|
||||
|
|
@ -44,7 +43,7 @@ public interface RepairService {
|
|||
/**
|
||||
* 查询维修单
|
||||
*/
|
||||
AjaxResult getRepairDocumentInfo(@NotBlank(message = "TaskId参数不能为空") String taskId);
|
||||
AjaxResult getRepairDocumentInfo(Long taskId);
|
||||
|
||||
/**
|
||||
* 提交维修记录
|
||||
|
|
@ -59,9 +58,9 @@ public interface RepairService {
|
|||
AjaxResult batchRepairApply(@NotNull List<RepairDeviceVO> repairDeviceVOList);
|
||||
|
||||
/**
|
||||
* 维修明细--批量审核--更新明细status
|
||||
* 维修明细--批量合格--更新明细status,以及repairedNum
|
||||
*/
|
||||
int completeRepair(ArrayList<Long> ids);
|
||||
int batchQualified(ArrayList<Long> ids);
|
||||
|
||||
/**
|
||||
* 查询维修人员列表
|
||||
|
|
@ -82,5 +81,5 @@ public interface RepairService {
|
|||
*/
|
||||
List<RepairTask> exportRepairTaskList(RepairTask bean);
|
||||
|
||||
List<RepairInputDetailsVo> getRepairedList(RepairInputDetails dto);
|
||||
List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -285,7 +285,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
Long backId = repairAuditDetailsMapper.getBackId(inputDetails.getRepairId());
|
||||
/* 添加驳回后维修详细表数据*/
|
||||
RepairTaskDetails repairTaskDetails = new RepairTaskDetails();
|
||||
repairTaskDetails.setTaskId(String.valueOf(inputTaskId));
|
||||
repairTaskDetails.setTaskId(inputTaskId);
|
||||
repairTaskDetails.setMaId(String.valueOf(inputDetails.getMaId()));
|
||||
repairTaskDetails.setTypeId(String.valueOf(inputDetails.getTypeId()));
|
||||
Integer repairNum = inputDetails.getRepairNum();
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package com.bonus.material.repair.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.NumberUtil;
|
||||
import com.bonus.common.biz.enums.MaTypeManageTypeEnum;
|
||||
import com.bonus.common.biz.enums.RepairTaskStatusEnum;
|
||||
import com.bonus.common.biz.enums.RepairTypeEnum;
|
||||
|
|
@ -155,14 +153,10 @@ public class RepairServiceImpl implements RepairService {
|
|||
* @param taskId 任务id
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult getRepairDocumentInfo(@NotBlank(message = "TaskId参数不能为空") String taskId) {
|
||||
if (!NumberUtil.isNumber(taskId)) {
|
||||
return AjaxResult.error("TaskId参数非数字类型,参数类型错误");
|
||||
}
|
||||
public AjaxResult getRepairDocumentInfo(Long taskId) {
|
||||
try {
|
||||
long thisTaskId = Long.parseLong(taskId);
|
||||
// 查询维修任务信息
|
||||
RepairTask repairTaskInfo = repairMapper.getRepairTaskInfoByTaskId(thisTaskId);
|
||||
RepairTask repairTaskInfo = repairMapper.getRepairTaskInfoByTaskId(taskId);
|
||||
if (Objects.isNull(repairTaskInfo)) {
|
||||
return AjaxResult.error("未查询到维修任务信息");
|
||||
}
|
||||
|
|
@ -182,14 +176,14 @@ public class RepairServiceImpl implements RepairService {
|
|||
repairDeviceSummaryList.removeIf(Objects::isNull);
|
||||
repairDeviceSummaryList.forEach(repairDevice -> {
|
||||
List<BmFileInfo> fileInfos = bmFileInfoMapper.selectBmFileInfoList(new BmFileInfo()
|
||||
.setTaskId(OptionalLong.of(thisTaskId).orElse(0L))
|
||||
.setTaskId(OptionalLong.of(taskId).orElse(0L))
|
||||
.setModelId(Optional.ofNullable(repairDevice.getIds()[0]).orElse(0L))
|
||||
.setTaskType(TmTaskTypeEnum.TM_TASK_REPAIR.getTaskTypeId())
|
||||
);
|
||||
repairDevice.setFileList(fileInfos);
|
||||
});
|
||||
|
||||
List<RepairPart> repairPartList = repairAuditDetailsMapper.getPartDetailsByTaskId(new RepairAuditDetails().setTaskId(thisTaskId));
|
||||
List<RepairPart> repairPartList = repairAuditDetailsMapper.getPartDetailsByTaskId(new RepairAuditDetails().setTaskId(taskId));
|
||||
repairPartList = mergePartsNum(repairPartList);
|
||||
RepairTicketVo result = new RepairTicketVo()
|
||||
.setRepairTaskInfo(repairTaskInfo)
|
||||
|
|
@ -385,7 +379,7 @@ public class RepairServiceImpl implements RepairService {
|
|||
for (RepairTaskDetails bean : list) {
|
||||
int repairedNum = bean.getRepairNum() - bean.getRepairedNum() - bean.getScrapNum();
|
||||
RepairApplyRecord repairRecord = new RepairApplyRecord();
|
||||
repairRecord.setTaskId(Long.valueOf(bean.getTaskId()));
|
||||
repairRecord.setTaskId(bean.getTaskId());
|
||||
repairRecord.setMaId(Long.valueOf(bean.getMaId()));
|
||||
repairRecord.setTypeId(Long.valueOf(bean.getTypeId()));
|
||||
repairRecord.setRepairNum(repairedNum);
|
||||
|
|
@ -806,11 +800,12 @@ public class RepairServiceImpl implements RepairService {
|
|||
// 查询维修任务的详情表
|
||||
List<RepairTaskDetails> detailsList = repairMapper.getDetailsListByTaskId(task);
|
||||
// 新增tm_task表数据、修饰审核任务、状态是待审核
|
||||
task.setTaskType(TmTaskTypeEnum.TM_TASK_REPAIR_STORAGE.getTaskTypeId());
|
||||
task.setTaskType(TmTaskTypeEnum.TM_TASK_REPAIR_AUDIT.getTaskTypeId());
|
||||
task.setTaskStatus(RepairTaskStatusEnum.TASK_STATUS_TO_EXAM.getStatus());
|
||||
repairMapper.addTask(task);
|
||||
|
||||
// 循环插入【修饰审核明细表】
|
||||
repairAuditDetailsMapper.deleteRepairAuditDetailsByTaskId(task.getTaskId());
|
||||
for (RepairTaskDetails details : detailsList) {
|
||||
details.setCreateBy(String.valueOf(loginUser.getUserid()));
|
||||
details.setTaskId(task.getTaskId());
|
||||
|
|
@ -835,12 +830,12 @@ public class RepairServiceImpl implements RepairService {
|
|||
}
|
||||
|
||||
/**
|
||||
* 维修明细--批量审核--更新明细status
|
||||
* 维修明细--批量合格--更新明细status,以及repairedNum
|
||||
*/
|
||||
@Override
|
||||
public int completeRepair(ArrayList<Long> ids) {
|
||||
public int batchQualified(ArrayList<Long> ids) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
return repairMapper.completeRepair(ids, loginUser.getUserid());
|
||||
return repairMapper.batchQualified(ids, loginUser.getUserid());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
@ -849,7 +844,7 @@ public class RepairServiceImpl implements RepairService {
|
|||
}
|
||||
|
||||
@Override
|
||||
public List<RepairInputDetailsVo> getRepairedList(RepairInputDetails dto) {
|
||||
public List<RepairInputDetailsVo> getRepairedList(RepairInputDetailsVo dto) {
|
||||
return repairMapper.getRepairedList(dto);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join ma_machine mma on rad.ma_id= mma.ma_id
|
||||
LEFT JOIN sys_user su ON su.user_id = tk.create_by
|
||||
WHERE
|
||||
tk.task_type = #{taskTypeCode}
|
||||
tk.task_type = #{taskType}
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, su.nick_name) > 0
|
||||
or locate(#{keyword}, tk.CODE) > 0
|
||||
|
|
@ -261,6 +261,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
delete from repair_audit_details where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepairAuditDetailsByTaskId" parameterType="Long">
|
||||
delete from repair_audit_details where task_id = #{taskId}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteRepairAuditDetailsByIds" parameterType="String">
|
||||
delete from repair_audit_details where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
|
|
@ -293,7 +297,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type_repair mtr ON mtr.type_id = rad.type_id
|
||||
LEFT JOIN sys_user su1 ON su1.user_id = mtr.user_id
|
||||
WHERE
|
||||
tk.task_type = #{taskTypeCode}
|
||||
tk.task_type = #{taskType}
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, su.nick_name) > 0
|
||||
or locate(#{keyword}, tk.CODE) > 0
|
||||
|
|
|
|||
|
|
@ -86,9 +86,10 @@
|
|||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<update id="completeRepair">
|
||||
<update id="batchQualified">
|
||||
update repair_apply_details
|
||||
set status = '1',
|
||||
repaired_num = repair_num,
|
||||
update_by = #{userId},
|
||||
update_time = now()
|
||||
where id in
|
||||
|
|
@ -413,20 +414,19 @@
|
|||
ANY_VALUE(tt.`code`) AS repairCode,
|
||||
ANY_VALUE(GROUP_CONCAT(DISTINCT a.typeName2)) AS maTypeName,
|
||||
ANY_VALUE(GROUP_CONCAT(DISTINCT a.typeId2)) AS typeId2,
|
||||
bpl.lot_name projectName,
|
||||
bpl.pro_name projectName,
|
||||
bui.unit_name unitName,
|
||||
ANY_VALUE(us.user_name) AS wxName,
|
||||
ANY_VALUE(tt.create_time) AS wxTime,
|
||||
ANY_VALUE(IFNULL(sd.`name`,'入库进行中')) AS taskStatus
|
||||
tt.task_status AS taskStatus
|
||||
FROM repair_input_details rid
|
||||
LEFT JOIN repair_apply_details rad on rid.repair_id=rad.id
|
||||
LEFT JOIN sys_user us on us.user_id=rad.repairer
|
||||
LEFT JOIN tm_task tt ON rid.task_id = tt.task_id
|
||||
LEFT JOIN tm_task_agreement tta ON tt.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 sys_dic sd ON tt.task_status = sd.id
|
||||
LEFT JOIN bm_project bpl ON bai.project_id = bpl.pro_id
|
||||
LEFT JOIN bm_unit bui ON bai.unit_id = bui.unit_id
|
||||
LEFT JOIN tm_task tt2 ON rad.task_id = tt2.task_id
|
||||
LEFT JOIN (
|
||||
SELECT mt.type_id AS typeId,mt.type_name AS typeName,mt.manage_type,mt2.type_id AS typeId2,mt2.type_name AS typeName2
|
||||
|
|
|
|||
Loading…
Reference in New Issue