后台维修代码提交
This commit is contained in:
parent
84b27e2e19
commit
007b2a9220
|
|
@ -1,27 +1,55 @@
|
||||||
package com.bonus.sgzb.base.controller;
|
package com.bonus.sgzb.base.controller;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.base.domain.BmProjectLot;
|
||||||
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.service.RepairService;
|
import com.bonus.sgzb.base.service.RepairService;
|
||||||
|
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||||
|
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 io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author c liu
|
* @author c liu
|
||||||
* @date 2023/12/11
|
* @date 2023/12/11
|
||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/repair")
|
@RequestMapping("/repair")
|
||||||
public class RepairController {
|
public class RepairController extends BaseController {
|
||||||
@Autowired
|
@Autowired
|
||||||
private RepairService service;
|
private RepairService service;
|
||||||
|
|
||||||
// @ApiOperation(value = "查询关键数据")
|
/**
|
||||||
// @Log(title = "关键数据", businessType = BusinessType.QUERY)
|
* 获取维修任务列表
|
||||||
// @GetMapping("/getCriticalData")
|
*/
|
||||||
// public AjaxResult getCriticalData()
|
@ApiOperation(value = "获取维修任务列表")
|
||||||
// {
|
@Log(title = "维修任务列表", businessType = BusinessType.QUERY)
|
||||||
// CriticalData data = service.getCriticalData();
|
@GetMapping("/getRepairTaskList")
|
||||||
// return AjaxResult.success("操作成功",data);
|
public TableDataInfo getRepairTaskList(RepairTask bean)
|
||||||
// }
|
{
|
||||||
|
startPage();
|
||||||
|
List<RepairTask> list = service.getRepairTaskList(bean);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取维修任务机具列表
|
||||||
|
*/
|
||||||
|
@ApiOperation(value = "获取维修任务机具列表")
|
||||||
|
@Log(title = "维修任务机具列表", businessType = BusinessType.QUERY)
|
||||||
|
@GetMapping("/getRepairMaTypeList")
|
||||||
|
public TableDataInfo getRepairMaTypeList(RepairTask bean)
|
||||||
|
{
|
||||||
|
startPage();
|
||||||
|
List<RepairTaskDetails> list = service.getRepairMaTypeList(bean);
|
||||||
|
return getDataTable(list);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public class RepairTask {
|
||||||
* 退料工程名称
|
* 退料工程名称
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "退料工程名称")
|
@ApiModelProperty(value = "退料工程名称")
|
||||||
private String backPro;
|
private String backProName;
|
||||||
/**
|
/**
|
||||||
* 维修机具类型
|
* 维修机具类型
|
||||||
*/
|
*/
|
||||||
|
|
@ -56,4 +56,7 @@ public class RepairTask {
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "维修状态")
|
@ApiModelProperty(value = "维修状态")
|
||||||
private String repairStatus;
|
private String repairStatus;
|
||||||
|
private String keyword;//关键字
|
||||||
|
private String startTime;//开始时间
|
||||||
|
private String endTime;//结束时间
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,57 @@
|
||||||
|
package com.bonus.sgzb.base.domain;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author c liu
|
||||||
|
* @date 2023/12/11
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ApiModel(value="维修任务明细")
|
||||||
|
public class RepairTaskDetails {
|
||||||
|
/**
|
||||||
|
* 类型名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "类型名称")
|
||||||
|
private String taskId;
|
||||||
|
/**
|
||||||
|
* 规格型号
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "规格型号")
|
||||||
|
private String repairCode;
|
||||||
|
/**
|
||||||
|
* 编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "编码")
|
||||||
|
private String backUnit;
|
||||||
|
/**
|
||||||
|
* 待修数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "待修数量")
|
||||||
|
private String repairNum;
|
||||||
|
/**
|
||||||
|
* 已修数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "已修数量")
|
||||||
|
private String repairedNum;
|
||||||
|
/**
|
||||||
|
* 待修状态
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "待修状态")
|
||||||
|
private String status;
|
||||||
|
/**
|
||||||
|
* 维修人员
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "维修人员")
|
||||||
|
private String createTime;
|
||||||
|
/**
|
||||||
|
* 维修时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "维修时间")
|
||||||
|
private String backCode;
|
||||||
|
|
||||||
|
private String keyword;//关键字
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,8 +1,12 @@
|
||||||
package com.bonus.sgzb.base.mapper;
|
package com.bonus.sgzb.base.mapper;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author c liu
|
* @author c liu
|
||||||
* @date 2023/12/11
|
* @date 2023/12/11
|
||||||
|
|
@ -10,4 +14,8 @@ import org.apache.ibatis.annotations.Param;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface RepairMapper {
|
public interface RepairMapper {
|
||||||
|
|
||||||
|
List<RepairTask> getRepairTaskList(RepairTask bean);
|
||||||
|
|
||||||
|
|
||||||
|
List<RepairTaskDetails> getRepairMaTypeList(RepairTask bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,10 @@
|
||||||
package com.bonus.sgzb.base.service;
|
package com.bonus.sgzb.base.service;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author c liu
|
* @author c liu
|
||||||
* @date 2023/12/11
|
* @date 2023/12/11
|
||||||
|
|
@ -7,4 +12,8 @@ package com.bonus.sgzb.base.service;
|
||||||
public interface RepairService {
|
public interface RepairService {
|
||||||
|
|
||||||
|
|
||||||
|
List<RepairTask> getRepairTaskList(RepairTask bean);
|
||||||
|
|
||||||
|
|
||||||
|
List<RepairTaskDetails> getRepairMaTypeList(RepairTask bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
package com.bonus.sgzb.base.service.impl;
|
package com.bonus.sgzb.base.service.impl;
|
||||||
|
|
||||||
|
import com.bonus.sgzb.base.domain.RepairTask;
|
||||||
|
import com.bonus.sgzb.base.domain.RepairTaskDetails;
|
||||||
import com.bonus.sgzb.base.mapper.RepairMapper;
|
import com.bonus.sgzb.base.mapper.RepairMapper;
|
||||||
import com.bonus.sgzb.base.service.RepairService;
|
import com.bonus.sgzb.base.service.RepairService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author c liu
|
* @author c liu
|
||||||
* @date 2023/12/11
|
* @date 2023/12/11
|
||||||
|
|
@ -15,4 +19,15 @@ public class RepairServiceImpl implements RepairService {
|
||||||
private RepairMapper mapper;
|
private RepairMapper mapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RepairTask> getRepairTaskList(RepairTask bean) {
|
||||||
|
return mapper.getRepairTaskList(bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<RepairTaskDetails> getRepairMaTypeList(RepairTask bean) {
|
||||||
|
return mapper.getRepairMaTypeList(bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -3,5 +3,30 @@
|
||||||
<mapper namespace="com.bonus.sgzb.base.mapper.RepairMapper">
|
<mapper namespace="com.bonus.sgzb.base.mapper.RepairMapper">
|
||||||
|
|
||||||
|
|
||||||
|
<select id="getRepairTaskList" resultType="com.bonus.sgzb.base.domain.RepairTask">
|
||||||
|
SELECT
|
||||||
|
ts.CODE AS repairCode,
|
||||||
|
bui.unit_name AS backUnit,
|
||||||
|
bpi.pro_name AS backProName,
|
||||||
|
ts.create_by AS createBy,
|
||||||
|
ts.create_time AS createTime,
|
||||||
|
bai.CODE AS backCode,
|
||||||
|
CASE
|
||||||
|
WHEN rad.radCount = rad2.radCount1 THEN '1' ELSE '0'
|
||||||
|
END AS repairStatus
|
||||||
|
FROM
|
||||||
|
tm_task ts
|
||||||
|
LEFT JOIN ( SELECT task_id, COUNT(*) AS radCount,back_id FROM repair_apply_details GROUP BY task_id,back_id ) rad ON ts.task_id = rad.task_id
|
||||||
|
LEFT JOIN ( SELECT task_id, COUNT(*) AS radCount1,back_id FROM repair_apply_details WHERE STATUS = '1' GROUP BY task_id,back_id ) rad2 ON ts.task_id = rad2.task_id
|
||||||
|
LEFT JOIN back_apply_info bai ON rad.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_info bpi ON bai2.project_id = bpi.pro_id
|
||||||
|
where ts.task_type = '1'
|
||||||
|
|
||||||
|
</select>
|
||||||
|
<select id="getRepairMaTypeList" resultType="com.bonus.sgzb.base.domain.RepairTaskDetails">
|
||||||
|
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue