diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java
index f4f773cd..b2a7499b 100644
--- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java
+++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/BackApplyController.java
@@ -223,7 +223,7 @@ public class BackApplyController extends BaseController {
return AjaxResult.error("退料设备明细为空,请重新选择后上传!");
}
for (BackApplyInfo backApplyInfo : record.getBackApplyDetails()){
- backApplyInfo.setId(record.getTaskId());
+ backApplyInfo.setParentId(record.getParentId());
boolean re =backApplyService.upload(backApplyInfo)>0;
if (!re){
return AjaxResult.error("退料任务明细插入失败");
@@ -233,25 +233,6 @@ public class BackApplyController extends BaseController {
}catch (Exception e){
return AjaxResult.error("创建任务失败," + e.getCause().toString() + "," + e.getMessage());
}
-// try {
-// if (!StringUtils.isEmpty(record.getTypeId()) && !StringUtils.isEmpty(record.getNum())){
-// String[] typeId = record.getTypeId().split(",");
-// String[] num = record.getNum().split(",");
-// for (int i=0;i< typeId.length;i++){
-// String typeIdStr=typeId[i];
-// String numStr=num[i];
-// record.setTypeId(typeIdStr);
-// record.setNum(numStr);
-// int re =backApplyService.upload(record);
-// if (re<1){
-// return AjaxResult.error("提交失败");
-// }
-// }
-// }
-// return AjaxResult.success("提交成功");
-// } catch (Exception e) {
-// throw new RuntimeException(e);
-// }
}
// 退料编号生成规则
diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml
index 806c9e6e..17cc0dde 100644
--- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml
+++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/BackApplyMapper.xml
@@ -283,7 +283,21 @@
bai.id = #{id}
- DELETE FROM back_apply_info WHERE id = #{id}
+ DELETE
+ FROM tm_task_agreement
+ WHERE task_id IN (SELECT task_id FROM back_apply_info WHERE id = #{id});
+
+ DELETE
+ FROM tm_task
+ WHERE task_id IN (SELECT task_id FROM back_apply_info WHERE id = #{id});
+
+ DELETE
+ FROM back_apply_details
+ WHERE parent_id IN (SELECT id FROM back_apply_info WHERE id = #{id});
+
+ DELETE
+ FROM back_apply_info
+ WHERE id = #{id};
@@ -327,7 +341,7 @@
tt.task_status as taskStatus,
tta.agreement_id as agreementId,
GROUP_CONCAT(DISTINCT bad.type_id) as typeId,
- GROUP_CONCAT(CONCAT_WS('/', IFNULL(mt3.type_name, ''))) AS typeName
+ GROUP_CONCAT(CONCAT_WS('/', IFNULL(mt2.type_name, ''))) AS typeName
FROM
back_apply_info bai
LEFT JOIN back_apply_details bad on bad.parent_id=bai.id
@@ -339,8 +353,6 @@
LEFT JOIN sys_user us on us.user_id=bai.create_by
LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id
- LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
- LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
ORDER BY bai.create_time desc
@@ -422,14 +434,14 @@
SELECT
bai.id,
- us.user_name as userName,
+ bai.back_person as backPerson,
bai.phone,
bpl.lot_name as lotName,
bui.unit_name as unitName,
bagi.plan_start_time as planStartTime,
tt.task_status as taskStatus,
GROUP_CONCAT(DISTINCT bad.type_id) as typeId,
- GROUP_CONCAT(CONCAT_WS('/', IFNULL(mt3.type_name, ''))) AS typeName,
+ GROUP_CONCAT(CONCAT_WS('/', IFNULL(mt2.type_name, ''))) AS typeName,
SUM(DISTINCT bad.pre_num) AS num,
bai.direct_audit_remark as directAuditRemark
FROM
@@ -443,18 +455,14 @@
LEFT JOIN sys_user us on us.user_id=bai.create_by
LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id
- LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
- LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
WHERE
-# bai.company_id=#{companyId}
-# and
bad.type_id is not null
GROUP BY bai.id, us.user_name, bai.phone, bpl.lot_name, bui.unit_name, bagi.plan_start_time
SELECT
mt.type_name typeCode,
- CONCAT_WS('/', IFNULL(mt3.type_name, '')) AS typeName,
+ CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName,
bad.pre_num as num,
mm.ma_code as maCode
FROM
@@ -463,8 +471,6 @@
LEFT JOIN ma_type mt on mt.type_id=bad.type_id
LEFT JOIN ma_type mt1 ON mt1.type_id=bad.type_id
LEFT JOIN ma_type mt2 ON mt2.type_id=mt1.parent_id
- LEFT JOIN ma_type mt3 ON mt3.type_id=mt2.parent_id
- LEFT JOIN ma_type mt4 ON mt4.type_id=mt3.parent_id
LEFT JOIN ma_machine mm on mm.type_id=bad.type_id
WHERE
bai.id=#{id}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairTestInputController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairTestInputController.java
index fb1c5a97..a84b55f0 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairTestInputController.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/RepairTestInputController.java
@@ -1,8 +1,12 @@
package com.bonus.sgzb.material.controller;
+import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
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 com.bonus.sgzb.material.domain.BackApplyInfo;
import com.bonus.sgzb.material.domain.RepairTestInputDetailVo;
import com.bonus.sgzb.material.domain.RepairTestInputDto;
import com.bonus.sgzb.material.domain.RepairTestInputVo;
@@ -12,6 +16,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
+import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -60,4 +65,17 @@ public class RepairTestInputController extends BaseController {
public AjaxResult inputByType(@RequestBody RepairTestInputDto dto){
return service.inputByType(dto);
}
+
+ /**
+ * 修试入库导出
+ */
+ @ApiOperation("修试入库导出")
+ @Log(title = "修试入库导出", businessType = BusinessType.EXPORT)
+ @PostMapping("export")
+ public void export(HttpServletResponse response, RepairTestInputDto bean)
+ {
+ List list = service.exportList(bean);
+ ExcelUtil util = new ExcelUtil(RepairTestInputDetailVo.class);
+ util.exportExcel(response, list, "修试入库数据");
+ }
}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ReturnOfMaterialsInfoController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ReturnOfMaterialsInfoController.java
index 88ff37fd..2d44eb19 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ReturnOfMaterialsInfoController.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/ReturnOfMaterialsInfoController.java
@@ -1,17 +1,23 @@
package com.bonus.sgzb.material.controller;
+import com.bonus.sgzb.common.core.utils.poi.ExcelUtil;
import com.bonus.sgzb.common.core.web.controller.BaseController;
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
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 com.bonus.sgzb.material.domain.BackApplyInfo;
import com.bonus.sgzb.material.domain.ReturnOfMaterialsInfo;
import com.bonus.sgzb.material.service.ReturnOfMaterialsInfoService;
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.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
+import javax.servlet.http.HttpServletResponse;
import java.util.List;
/**
@@ -47,4 +53,17 @@ public class ReturnOfMaterialsInfoController extends BaseController {
return AjaxResult.success(list);
}
+ /**
+ * 退料入库导出
+ */
+ @ApiOperation("退料入库导出")
+ @Log(title = "退料入库导出", businessType = BusinessType.EXPORT)
+ @PostMapping("/export")
+ public void export(HttpServletResponse response, ReturnOfMaterialsInfo bean)
+ {
+ List list = returnOfMaterialsInfoService.exportList(bean);
+ ExcelUtil util = new ExcelUtil(ReturnOfMaterialsInfo.class);
+ util.exportExcel(response, list, "退料入库数据");
+ }
+
}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairTestInputDetailVo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairTestInputDetailVo.java
index 958e41f6..9f48bf3f 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairTestInputDetailVo.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/RepairTestInputDetailVo.java
@@ -1,5 +1,6 @@
package com.bonus.sgzb.material.domain;
+import com.bonus.sgzb.common.core.annotation.Excel;
import lombok.Data;
/**
@@ -15,33 +16,53 @@ public class RepairTestInputDetailVo {
/** 机具id*/
private Integer maId;
+ /** 维修单号*/
+ @Excel(name = "维修单号")
+ private String repairCode;
+
/** 规格ID*/
private Integer typeId;
/** 设备类型*/
- private String typeName;
+ @Excel(name = "工机具类型")
+ private String typeName2;
/** 规格型号*/
- private String typeName2;
+ @Excel(name = "规格型号")
+ private String typeName;
+
+ /** 维修人员*/
+ @Excel(name = "维修人员")
+ private String wxName;
+
+ /** 维修时间*/
+ @Excel(name = "维修时间")
+ private String wxTime;
/** 管理方式(0编号 1计数)*/
private String manageType;
/** 数量*/
+ @Excel(name = "数量")
private double repairNum;
/** 编号*/
+ @Excel(name = "编号")
private String maCode;
/** 提交入库人员*/
+ @Excel(name = "提交入库人员")
private String updateBy;
/** 提交入库时间*/
+ @Excel(name = "提交入库时间")
private String updateTime;
/** 不通过原因*/
+ @Excel(name = "不通过原因")
private String remark;
/** 状态*/
+ @Excel(name = "状态")
private String status;
}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ReturnOfMaterialsInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ReturnOfMaterialsInfo.java
index e977e937..b224f5dd 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ReturnOfMaterialsInfo.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/ReturnOfMaterialsInfo.java
@@ -1,5 +1,6 @@
package com.bonus.sgzb.material.domain;
+import com.bonus.sgzb.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -16,30 +17,42 @@ public class ReturnOfMaterialsInfo {
/** 退料单号 */
@ApiModelProperty(value = "退料单号")
+ @Excel(name = "退料单号")
private String code;
/** 退料单位 */
@ApiModelProperty(value = "退料单位")
+ @Excel(name = "退料单位")
private String unitName;
/** 退料工程 */
@ApiModelProperty(value = "退料工程")
+ @Excel(name = "退料工程")
private String lotName;
+ @ApiModelProperty(value = "类型名称")
+ @Excel(name = "退料机具类型")
+ private String typeName;
+
@ApiModelProperty(value = "机具id")
private Long kindId;
+
@ApiModelProperty(value = "机具名称")
+ @Excel(name = "退料设备类型")
private String kindName;
+
@ApiModelProperty(value = "类型id")
private Long typeId;
+
@ApiModelProperty(value = "类型ids")
private String typeIds;
- @ApiModelProperty(value = "类型名称")
- private String typeName;
+
@ApiModelProperty(value = "规格型号id")
private Long modelId;
+
@ApiModelProperty(value = "规格型号")
+ @Excel(name = "退料规格型号")
private String modelName;
@@ -50,15 +63,19 @@ public class ReturnOfMaterialsInfo {
private String maCode;
@ApiModelProperty(value = "退料时间")
+ @Excel(name = "退料时间")
private String returnTime;
- @ApiModelProperty(value = "提交入库时间")
- private String submitStorageTime;
-
@ApiModelProperty(value = "提交入库人员")
+ @Excel(name = "提交入库人员")
private String submitToStoragePersonnel;
+ @ApiModelProperty(value = "提交入库时间")
+ @Excel(name = "提交入库时间")
+ private String submitStorageTime;
+
@ApiModelProperty(value = "备注")
+ @Excel(name = "备注")
private String remark;
@ApiModelProperty(value = "关键字")
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairTestInputMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairTestInputMapper.java
index 852c5ddd..fe67d338 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairTestInputMapper.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/RepairTestInputMapper.java
@@ -104,4 +104,13 @@ public interface RepairTestInputMapper {
void updateTmTaskStatus(@Param("params") RepairTestWarehousingDto dto, @Param("dictId") int dicId);
int insertRepairInputDetails(RepairInputDetails repairTestWarehousingDto);
+
+ /**
+ * @param bean
+ * @return List
+ * @description 修试入库--导出
+ * @author hay
+ * @date 2024/1/9 15:14
+ */
+ List exportList(RepairTestInputDto bean);
}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ReturnOfMaterialsInfoMapper.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ReturnOfMaterialsInfoMapper.java
index 555a5156..5adf61e6 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ReturnOfMaterialsInfoMapper.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/mapper/ReturnOfMaterialsInfoMapper.java
@@ -16,4 +16,5 @@ public interface ReturnOfMaterialsInfoMapper {
List getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean);
List getTypeList(String level);
+
}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairTestInputService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairTestInputService.java
index 3fae5737..533e7564 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairTestInputService.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/RepairTestInputService.java
@@ -31,11 +31,20 @@ public interface RepairTestInputService {
List getRepairedDetailList(RepairTestInputDto dto);
/**
- * @param params
+ * @param dto
* @return AjaxResult
* @description 修试后入库-入库操作
* @author cwchen
* @date 2023/12/16 18:35
*/
AjaxResult inputByType(RepairTestInputDto dto);
+
+ /**
+ * @param bean
+ * @return List
+ * @description 修试入库-导出
+ * @author hay
+ * @date 2024/1/9 15:13
+ */
+ List exportList(RepairTestInputDto bean);
}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ReturnOfMaterialsInfoService.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ReturnOfMaterialsInfoService.java
index 0fdb5f7a..9ea538bb 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ReturnOfMaterialsInfoService.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/ReturnOfMaterialsInfoService.java
@@ -13,4 +13,9 @@ public interface ReturnOfMaterialsInfoService {
List getReturnOfMaterialsInfoAll(ReturnOfMaterialsInfo bean);
List getTypeList(String level);
+
+ /**
+ * 退料入库导出
+ */
+ List exportList(ReturnOfMaterialsInfo bean);
}
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairTestInputServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairTestInputServiceImpl.java
index 07309a84..4bf4df06 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairTestInputServiceImpl.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/RepairTestInputServiceImpl.java
@@ -109,6 +109,11 @@ public class RepairTestInputServiceImpl implements RepairTestInputService {
return AjaxResult.success();
}
+ @Override
+ public List exportList(RepairTestInputDto bean) {
+ return mapper.exportList(bean);
+ }
+
/**
* @param num
* @param repairNum
diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ReturnOfMaterialsInfoServiceImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ReturnOfMaterialsInfoServiceImpl.java
index 2b382776..3bce78f1 100644
--- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ReturnOfMaterialsInfoServiceImpl.java
+++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/ReturnOfMaterialsInfoServiceImpl.java
@@ -26,4 +26,9 @@ public class ReturnOfMaterialsInfoServiceImpl implements ReturnOfMaterialsInfoSe
public List getTypeList(String level) {
return returnOfMaterialsInfoMapper.getTypeList(level);
}
+
+ @Override
+ public List exportList(ReturnOfMaterialsInfo bean) {
+ return returnOfMaterialsInfoMapper.getReturnOfMaterialsInfoAll(bean);
+ }
}
diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairTestInputMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairTestInputMapper.xml
index 1af4aea7..d8313532 100644
--- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairTestInputMapper.xml
+++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/RepairTestInputMapper.xml
@@ -164,6 +164,49 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
COUNT(*) AS totalNum
FROM repair_input_details WHERE task_id = #{taskId}
+
+ SELECT rid.id,
+ tt2.`code` as repairCode,
+ tt2.create_by as wxName,
+ tt2.create_time as wxTime,
+ 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 tm_task tt2 ON rid.repair_id = tt2.task_id
+ 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'
+ WHERE mt.`level` = '4'
+ )a ON rid.type_id = a.typeId
+
+
+ INSTR(b.typeId2,#{deviceTypeId}) > 0
+
+
+ AND b.wxTime BETWEEN CONCAT(#{wxTime},' 00:00:00') AND CONCAT(#{wxTime},' 23:59:59')
+
+
+ AND (
+ INSTR(b.repairCode,#{keyWord}) > 0 OR
+ INSTR(b.wxName,#{keyWord}) > 0
+ )
+
+
+ ORDER BY rid.create_time DESC
+
+
insert into repair_input_details
diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml
index 10d71683..4ec65e5e 100644
--- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml
+++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/ReturnOfMaterialsInfoMapper.xml
@@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
iad.input_num as inputNum,mm.ma_code as maCode,
tt.create_time as returnTime,
iad.create_time as submitStorageTime,
- iad.create_by as submitToStoragePersonnel,iad.remark as remark
+ us.user_name as submitToStoragePersonnel,iad.remark as remark
FROM input_apply_details iad
LEFT JOIN tm_task tt ON iad.task_id = tt.task_id
LEFT JOIN tm_task_agreement tta on tta.task_id = tt.task_id
@@ -21,9 +21,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
LEFT JOIN ma_type mt on mt.type_id = iad.type_id
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'
+ LEFT JOIN sys_user us on us.user_id=iad.create_by
LEFT JOIN ma_machine mm ON mm.ma_id = iad.ma_id
- WHERE tt.task_status = '38' and mt.`level` = '4' and input_type ='2'
+ WHERE tt.task_status = '40' and mt.`level` = '4' and input_type ='2'
and tt.`code` like concat('%', #{keyWord}, '%')