refactor(bonus-material): 优化维修审核功能和相关接口
This commit is contained in:
parent
2fb8ae8e41
commit
fc797a22f3
|
|
@ -1,12 +1,12 @@
|
|||
package com.bonus.material.repair.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
|
|
@ -27,14 +27,14 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
|||
/**
|
||||
* 维修记录Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
* @author syruan
|
||||
*/
|
||||
@Api(tags = "维修记录接口")
|
||||
@RestController
|
||||
@RequestMapping("/repair_apply_record")
|
||||
public class RepairApplyRecordController extends BaseController {
|
||||
@Autowired
|
||||
|
||||
@Resource
|
||||
private IRepairApplyRecordService repairApplyRecordService;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -49,17 +49,11 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("查询修试审核任务列表")
|
||||
@GetMapping("/questList")
|
||||
@SysLog(title = "查询修试审核任务列表", businessType = OperaType.QUERY, logType = 1,module = "机具系统->查询修试审核任务列表")
|
||||
@RequiresPermissions("service:auditing:list")
|
||||
public TableDataInfo questList(RepairAuditDetails repairAuditDetails) {
|
||||
startPage();
|
||||
Map<String, Object> params = repairAuditDetails.getParams();
|
||||
if (params != null && !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);
|
||||
}
|
||||
repairAuditDetailsService.queryTimeCope(repairAuditDetails);
|
||||
List<ScrapApplyDetailsVO> list = repairAuditDetailsService.selectRepairQuestList(repairAuditDetails);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
|
@ -68,15 +62,9 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
* 导出修试审核任务列表
|
||||
*/
|
||||
@PostMapping("/export")
|
||||
@SysLog(title = "导出修试审核任务列表", businessType = OperaType.EXPORT, logType = 1,module = "机具系统->导出修试审核任务列表")
|
||||
public void exportAudit(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);
|
||||
}
|
||||
repairAuditDetailsService.queryTimeCope(bean);
|
||||
List<RepairAuditDetailsVO> list = repairAuditDetailsService.exportRepairQuestList(bean);
|
||||
ExcelUtil<RepairAuditDetailsVO> util = new ExcelUtil<>(RepairAuditDetailsVO.class);
|
||||
util.exportExcel(response, list, "修试审核任务列表");
|
||||
|
|
@ -87,7 +75,7 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("查看修饰审核任务详细列表")
|
||||
@GetMapping("/getRepairAuditList")
|
||||
@RequiresPermissions("service:auditing")
|
||||
@RequiresPermissions("service:auditing:list")
|
||||
public TableDataInfo getRepairAuditList(RepairAuditDetails repairAuditDetails) {
|
||||
startPage();
|
||||
List<RepairAuditDetails> list = repairAuditDetailsService.getRepairAuditList(repairAuditDetails);
|
||||
|
|
@ -128,7 +116,7 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
|
||||
|
||||
|
||||
//--------------------TOP--COPY--------------------------BUTTON--GENDER---------------
|
||||
//-----------------------------TOP--COPY--BUTTON--GENDER------------------------------
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.material.repair.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -9,6 +11,7 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.ToString;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
|
||||
|
||||
/**
|
||||
* 修试审核详细对象 repair_audit_details
|
||||
*
|
||||
|
|
@ -29,18 +32,22 @@ public class RepairAuditDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
@Excel(name = "任务状态")
|
||||
private String taskStatus;
|
||||
|
||||
@ApiModelProperty(value = "任务类型编码")
|
||||
private Integer taskTypeCode = TmTaskTypeEnum.TM_TASK_REPAIR.getTaskTypeId();
|
||||
|
||||
/** 维修ID */
|
||||
@Excel(name = "维修ID")
|
||||
@ApiModelProperty(value = "维修ID")
|
||||
private Long repairId;
|
||||
|
||||
/** 机具ID */
|
||||
@Excel(name = "机具ID")
|
||||
@ApiModelProperty(value = "机具ID")
|
||||
private Long maId;
|
||||
|
||||
/** 规格ID */
|
||||
@Excel(name = "规格ID")
|
||||
@ApiModelProperty(value = "规格ID")
|
||||
private Long typeId;
|
||||
|
||||
|
|
@ -67,7 +74,7 @@ public class RepairAuditDetails extends BaseEntity {
|
|||
/** 审核时间 */
|
||||
@ApiModelProperty(value = "审核时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd hh:mm:ss")
|
||||
private Date auditTime;
|
||||
|
||||
/** 备注备注 */
|
||||
|
|
@ -76,17 +83,14 @@ public class RepairAuditDetails extends BaseEntity {
|
|||
private String auditRemark;
|
||||
|
||||
/** 0未审核1已审核2驳回 */
|
||||
@Excel(name = "0未审核1已审核2驳回")
|
||||
@Excel(name = "状态", readConverterExp = "0=未审核,1=已审核,2=驳回")
|
||||
@ApiModelProperty(value = "0未审核1已审核2驳回")
|
||||
private String status;
|
||||
private char status;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@Excel(name = "数据所属组织")
|
||||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Integer companyId;
|
||||
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private String taskStatus;
|
||||
|
||||
/**传入参数*/
|
||||
@ApiModelProperty(value = "单位id")
|
||||
|
|
@ -99,6 +103,8 @@ public class RepairAuditDetails extends BaseEntity {
|
|||
private String backCode;
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyword;
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
|
||||
@Excel(name = "设备类型")
|
||||
@ApiModelProperty(value = "设备类型")
|
||||
private String typeName;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,4 +72,6 @@ public class RepairTaskDetails extends BaseEntity {
|
|||
|
||||
@ApiModelProperty(value = "组织id")
|
||||
private Long companyId;
|
||||
|
||||
private Long backId;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,8 @@ import lombok.Data;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author 阮世耀
|
||||
* @Create 2023/12/13 15:45
|
||||
* @Version 1.0
|
||||
* @author : 阮世耀
|
||||
* @version : 2.0
|
||||
*/
|
||||
@Data
|
||||
public class ScrapApplyDetailsVO {
|
||||
|
|
@ -38,9 +37,9 @@ public class ScrapApplyDetailsVO {
|
|||
private String projectName;
|
||||
|
||||
/**
|
||||
* 班组名称
|
||||
* 维修班组名称
|
||||
*/
|
||||
@ApiModelProperty(value = "班组名称")
|
||||
@ApiModelProperty(value = "维修班组名称")
|
||||
private String teamName;
|
||||
|
||||
/**
|
||||
|
|
@ -53,6 +52,7 @@ public class ScrapApplyDetailsVO {
|
|||
* 机具类型
|
||||
*/
|
||||
private String itemType;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,8 +11,7 @@ import com.bonus.material.repair.domain.vo.ScrapApplyDetailsVO;
|
|||
/**
|
||||
* 修试审核详细Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
* @author syruan
|
||||
*/
|
||||
public interface RepairAuditDetailsMapper {
|
||||
|
||||
|
|
@ -33,7 +32,7 @@ public interface RepairAuditDetailsMapper {
|
|||
* @param id 修试审核详细主键
|
||||
* @return 修试审核详细
|
||||
*/
|
||||
public RepairAuditDetails selectRepairAuditDetailsById(Long id);
|
||||
RepairAuditDetails selectRepairAuditDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 查询修试审核详细列表
|
||||
|
|
@ -41,7 +40,7 @@ public interface RepairAuditDetailsMapper {
|
|||
* @param repairAuditDetails 修试审核详细
|
||||
* @return 修试审核详细集合
|
||||
*/
|
||||
public List<RepairAuditDetails> selectRepairAuditDetailsList(RepairAuditDetails repairAuditDetails);
|
||||
List<RepairAuditDetails> selectRepairAuditDetailsList(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
/**
|
||||
* 新增修试审核详细
|
||||
|
|
@ -49,7 +48,7 @@ public interface RepairAuditDetailsMapper {
|
|||
* @param repairAuditDetails 修试审核详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRepairAuditDetails(RepairAuditDetails repairAuditDetails);
|
||||
int insertRepairAuditDetails(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
/**
|
||||
* 修改修试审核详细
|
||||
|
|
@ -57,7 +56,7 @@ public interface RepairAuditDetailsMapper {
|
|||
* @param repairAuditDetails 修试审核详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRepairAuditDetails(RepairAuditDetails repairAuditDetails);
|
||||
int updateRepairAuditDetails(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
/**
|
||||
* 删除修试审核详细
|
||||
|
|
@ -65,7 +64,7 @@ public interface RepairAuditDetailsMapper {
|
|||
* @param id 修试审核详细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepairAuditDetailsById(Long id);
|
||||
int deleteRepairAuditDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除修试审核详细
|
||||
|
|
@ -73,7 +72,7 @@ public interface RepairAuditDetailsMapper {
|
|||
* @param ids 需要删除的数据主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepairAuditDetailsByIds(Long[] ids);
|
||||
int deleteRepairAuditDetailsByIds(Long[] ids);
|
||||
|
||||
List<ScrapApplyDetailsVO> selectRepairQuestList(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
|
|
@ -89,7 +88,7 @@ public interface RepairAuditDetailsMapper {
|
|||
|
||||
void updateStatus(RepairAuditDetails bean);
|
||||
|
||||
void updateRepairCost(RepairAuditDetails inputDetails, String status);
|
||||
void updateRepairCost(RepairAuditDetails inputDetails, char status);
|
||||
|
||||
void insertRepairDetails(RepairTaskDetails repairTaskDetails);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.material.repair.service;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.bonus.material.repair.domain.RepairAuditDetails;
|
||||
import com.bonus.material.repair.domain.RepairPart;
|
||||
import com.bonus.material.repair.domain.RepairRecord;
|
||||
|
|
@ -11,8 +13,7 @@ import com.bonus.material.repair.domain.vo.ScrapAudit;
|
|||
/**
|
||||
* 修试审核详细Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
* @author syruan
|
||||
*/
|
||||
public interface IRepairAuditDetailsService {
|
||||
/**
|
||||
|
|
@ -21,8 +22,12 @@ public interface IRepairAuditDetailsService {
|
|||
* @param id 修试审核详细主键
|
||||
* @return 修试审核详细
|
||||
*/
|
||||
public RepairAuditDetails selectRepairAuditDetailsById(Long id);
|
||||
RepairAuditDetails selectRepairAuditDetailsById(Long id);
|
||||
|
||||
/**
|
||||
* 公共方法来处理时间格式化 YYYY-MM-DD 增加 HH:mm:ss
|
||||
*/
|
||||
void formatTimeParam(Map<String, Object> params, String key, String suffix);
|
||||
|
||||
/**
|
||||
* 查询修试审核任务列表
|
||||
|
|
@ -39,6 +44,8 @@ public interface IRepairAuditDetailsService {
|
|||
*/
|
||||
List<RepairAuditDetails> getRepairAuditList(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
void queryTimeCope(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
List<RepairRecord> getRepairRecord(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
List<RepairPart> getPartRecord(RepairAuditDetails repairAuditDetails);
|
||||
|
|
@ -55,7 +62,7 @@ public interface IRepairAuditDetailsService {
|
|||
* @param repairAuditDetails 修试审核详细
|
||||
* @return 修试审核详细集合
|
||||
*/
|
||||
public List<RepairAuditDetails> selectRepairAuditDetailsList(RepairAuditDetails repairAuditDetails);
|
||||
List<RepairAuditDetails> selectRepairAuditDetailsList(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
/**
|
||||
* 新增修试审核详细
|
||||
|
|
@ -63,7 +70,7 @@ public interface IRepairAuditDetailsService {
|
|||
* @param repairAuditDetails 修试审核详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertRepairAuditDetails(RepairAuditDetails repairAuditDetails);
|
||||
int insertRepairAuditDetails(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
/**
|
||||
* 修改修试审核详细
|
||||
|
|
@ -71,7 +78,7 @@ public interface IRepairAuditDetailsService {
|
|||
* @param repairAuditDetails 修试审核详细
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateRepairAuditDetails(RepairAuditDetails repairAuditDetails);
|
||||
int updateRepairAuditDetails(RepairAuditDetails repairAuditDetails);
|
||||
|
||||
/**
|
||||
* 批量删除修试审核详细
|
||||
|
|
@ -79,7 +86,7 @@ public interface IRepairAuditDetailsService {
|
|||
* @param ids 需要删除的修试审核详细主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepairAuditDetailsByIds(Long[] ids);
|
||||
int deleteRepairAuditDetailsByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除修试审核详细信息
|
||||
|
|
@ -87,5 +94,5 @@ public interface IRepairAuditDetailsService {
|
|||
* @param id 修试审核详细主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteRepairAuditDetailsById(Long id);
|
||||
int deleteRepairAuditDetailsById(Long id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.bonus.common.biz.enums.RepairTaskStatusEnum;
|
||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||
|
|
@ -22,7 +23,6 @@ import com.bonus.material.task.domain.TmTaskAgreement;
|
|||
import com.bonus.material.task.mapper.TmTaskAgreementMapper;
|
||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.material.repair.mapper.RepairAuditDetailsMapper;
|
||||
import com.bonus.material.repair.service.IRepairAuditDetailsService;
|
||||
|
|
@ -33,7 +33,7 @@ import javax.annotation.Resource;
|
|||
/**
|
||||
* 修试审核详细Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @author syruan
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Service
|
||||
|
|
@ -51,9 +51,6 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
@Resource
|
||||
private ScrapApplyDetailsMapper scrapApplyDetailsMapper;
|
||||
|
||||
// @Resource
|
||||
// private RepairTestInputMapper repairTestInputMapper;
|
||||
|
||||
@Resource
|
||||
private RepairInputDetailsMapper repairInputDetailsMapper;
|
||||
|
||||
|
|
@ -80,6 +77,16 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
return repairAuditDetailsList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void queryTimeCope(RepairAuditDetails repairAuditDetails) {
|
||||
Map<String, Object> params = repairAuditDetails.getParams();
|
||||
if (params != null && !params.isEmpty()) {
|
||||
formatTimeParam(params, "beginTime", " 00:00:00");
|
||||
formatTimeParam(params, "endTime", " 23:59:59");
|
||||
repairAuditDetails.setParams(params);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<RepairAuditDetailsVO> exportRepairQuestList(RepairAuditDetails bean) {
|
||||
return repairAuditDetailsMapper.exportRepairQuestList(bean);
|
||||
|
|
@ -116,7 +123,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
List<Long> taskIdList = scrapAudit.getTaskIdList();
|
||||
Integer b = 0;
|
||||
for (Long taskId : taskIdList) {
|
||||
String status = "0";
|
||||
char status;
|
||||
TmTask task1 = taskMapper.selectTmTaskByTaskId(taskId);
|
||||
if (task1.getTaskStatus() == 47) {
|
||||
throw new Exception("任务已审核已通过");
|
||||
|
|
@ -126,12 +133,12 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
List<RepairAuditDetails> notAuditList = repairAuditDetailsMapper.selectnotAuditByTaskId(taskId);
|
||||
// 查询协议表
|
||||
TmTaskAgreement tmTaskAgreement = agreementMapper.selectTmTaskAgreementByTaskId(taskId);
|
||||
String taskCode = "";
|
||||
int taskStatus = 0;
|
||||
int taskType = 0;
|
||||
String taskCode;
|
||||
int taskStatus;
|
||||
int taskType;
|
||||
int companyId = 0;
|
||||
if ("通过".equals(checkResult)) {
|
||||
status = "1";
|
||||
status = 1;
|
||||
List<RepairAuditDetails> repairInputList = new ArrayList<>();
|
||||
List<RepairAuditDetails> scrapNumList = new ArrayList<>();
|
||||
if (auditDetailList != null && auditDetailList.size() > 0) {
|
||||
|
|
@ -192,8 +199,6 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
companyId = scrapNumList.get(0).getCompanyId();
|
||||
}
|
||||
taskCode = purchaseCodeRule("BF", TmTaskTypeEnum.TM_TASK_SCRAP.getTaskTypeId());
|
||||
/*taskStatus = 58;
|
||||
taskType = 57;*/
|
||||
//创建报废任务
|
||||
long scrapTaskId = genTask(taskCode, TmTaskTypeEnum.TM_TASK_SCRAP.getTaskTypeId(), RepairTaskStatusEnum.SCRAP_UNDER_REVIEW.getStatus(), tmTaskAgreement, companyId);
|
||||
for (RepairAuditDetails scrapDetails : scrapNumList) {
|
||||
|
|
@ -237,7 +242,7 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
task1.setUpdateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
taskMapper.updateTmTask(task1);
|
||||
} else {
|
||||
status = "2";
|
||||
status = 2;
|
||||
List<RepairAuditDetails> repairDetailList = new ArrayList<>();
|
||||
if (auditDetailList != null && auditDetailList.size() > 0) {
|
||||
repairDetailList.addAll(auditDetailList);
|
||||
|
|
@ -264,9 +269,8 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
repairTaskDetails.setStatus("0");
|
||||
repairTaskDetails.setCreateBy(String.valueOf(SecurityUtils.getLoginUser().getUserid()));
|
||||
repairTaskDetails.setCompanyId((long) companyId);
|
||||
// repairTaskDetails.setBackId(backId);
|
||||
repairTaskDetails.setBackId(backId);
|
||||
repairAuditDetailsMapper.insertRepairDetails(repairTaskDetails);
|
||||
|
||||
repairAuditDetailsMapper.updateRepairCost(inputDetails,status);
|
||||
}
|
||||
}
|
||||
|
|
@ -326,6 +330,9 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
return codeNum;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成任务并返回任务id
|
||||
*/
|
||||
private long genTask(String taskCode, int taskType, int taskStatus, TmTaskAgreement tmTaskAgreement, int companyId) {
|
||||
TmTask task = new TmTask();
|
||||
task.setCode(taskCode);
|
||||
|
|
@ -361,6 +368,19 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
return repairAuditDetailsMapper.selectRepairAuditDetailsById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 公共方法来处理时间格式化
|
||||
*/
|
||||
@Override
|
||||
public void formatTimeParam(Map<String, Object> params, String key, String suffix) {
|
||||
String time = (String) params.get(key);
|
||||
if (time != null && !time.isEmpty()) {
|
||||
params.put(key, time.trim() + suffix);
|
||||
} else {
|
||||
params.remove(key);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询修试审核详细列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -111,7 +111,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 = 45
|
||||
tk.task_type = #{taskTypeCode}
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, su.nick_name) > 0
|
||||
or locate(#{keyword}, tk.CODE) > 0
|
||||
|
|
@ -257,7 +257,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
su.nick_name createBy,
|
||||
tk.create_time createTime,
|
||||
tk.remark,
|
||||
tk.CODE repairNum
|
||||
tk.CODE repairNum,
|
||||
su1.user_name as teamName
|
||||
FROM
|
||||
tm_task tk
|
||||
LEFT JOIN tm_task_agreement tta ON tk.task_id = tta.task_id
|
||||
|
|
@ -268,8 +269,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
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
|
||||
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 = 45
|
||||
tk.task_type = #{taskTypeCode}
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (locate(#{keyword}, su.nick_name) > 0
|
||||
or locate(#{keyword}, tk.CODE) > 0
|
||||
|
|
|
|||
Loading…
Reference in New Issue