导出优化
This commit is contained in:
parent
32e338bad2
commit
2a9eea531c
|
|
@ -27,6 +27,14 @@ public class RepairInputDetails extends BaseEntity {
|
|||
/** ID */
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "序号")
|
||||
@Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, width = 5,sort = 0)
|
||||
private Integer seq;
|
||||
|
||||
@ApiModelProperty(value = "分公司")
|
||||
@Excel(name = "分公司",sort = 1)
|
||||
private String impUnitName;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
|
@ -72,25 +80,25 @@ public class RepairInputDetails extends BaseEntity {
|
|||
* 退料单位名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料单位名称")
|
||||
@Excel(name = "退料单位",sort = 1)
|
||||
@Excel(name = "退料单位",sort = 2)
|
||||
private String backUnit;
|
||||
/**
|
||||
* 退料工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料工程名称")
|
||||
@Excel(name = "工程名称",sort = 2)
|
||||
@Excel(name = "退料工程",sort = 3)
|
||||
private String backPro;
|
||||
|
||||
@ApiModelProperty(value = "修饰入库编码")
|
||||
@Excel(name = "入库单号",sort = 3)
|
||||
@Excel(name = "入库单号",sort = 4)
|
||||
private String inputCode;
|
||||
|
||||
@ApiModelProperty(value = "物资类型")
|
||||
@Excel(name = "物资类型",sort = 4)
|
||||
@Excel(name = "物资类型",sort = 5)
|
||||
private String materialType;
|
||||
|
||||
@ApiModelProperty(value = "修饰入库编码")
|
||||
@Excel(name = "维修单号",sort = 5)
|
||||
@Excel(name = "维修单号",sort = 6)
|
||||
private String repairCode;
|
||||
|
||||
@Excel(name = "创建人")
|
||||
|
|
|
|||
|
|
@ -24,6 +24,10 @@ import java.util.List;
|
|||
public class RepairInputExportDetails extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "序号")
|
||||
@Excel(name = "序号", cellType = Excel.ColumnType.NUMERIC, width = 5, sort = 0)
|
||||
private Integer seq;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
|
|
@ -59,25 +63,29 @@ public class RepairInputExportDetails extends BaseEntity {
|
|||
@ApiModelProperty(value = "二维码code")
|
||||
private String qrCode;
|
||||
|
||||
@ApiModelProperty(value = "分公司")
|
||||
@Excel(name = "分公司",sort = 1)
|
||||
private String impUnitName;
|
||||
|
||||
/**
|
||||
* 退料单位名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料单位名称")
|
||||
@Excel(name = "退料单位",sort = 1)
|
||||
@Excel(name = "退料单位",sort = 2)
|
||||
private String backUnit;
|
||||
/**
|
||||
* 退料工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料工程名称")
|
||||
@Excel(name = "退料工程",sort = 2, width = 30)
|
||||
@Excel(name = "退料工程",sort = 3, width = 30)
|
||||
private String backPro;
|
||||
|
||||
@ApiModelProperty(value = "修饰入库编码")
|
||||
@Excel(name = "入库单号",sort = 3)
|
||||
@Excel(name = "入库单号",sort = 4)
|
||||
private String inputCode;
|
||||
|
||||
@ApiModelProperty(value = "物资名称")
|
||||
@Excel(name = "物资名称",sort = 4)
|
||||
@Excel(name = "物资名称",sort = 5)
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
|
|
|
|||
|
|
@ -51,6 +51,10 @@ public class BackApplyInfo implements Serializable {
|
|||
@ApiModelProperty(value = "单位id")
|
||||
private Long unitId;
|
||||
|
||||
@ApiModelProperty(value = "分公司")
|
||||
@Excel(name = "分公司")
|
||||
private String impUnitName;
|
||||
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
@Excel(name = "退料单位")
|
||||
private String unitName;
|
||||
|
|
|
|||
|
|
@ -48,6 +48,10 @@ public class BackExportDetailsVo implements Serializable {
|
|||
@ApiModelProperty(value = "单位id")
|
||||
private Long unitId;
|
||||
|
||||
@ApiModelProperty(value = "分公司")
|
||||
@Excel(name = "分公司")
|
||||
private String impUnitName;
|
||||
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
@Excel(name = "退料单位")
|
||||
private String unitName;
|
||||
|
|
|
|||
|
|
@ -799,7 +799,8 @@ public class BackApplyInfoServiceImpl implements IBackApplyInfoService {
|
|||
(item.getBackPerson() != null && item.getBackPerson().contains(keyWord)) ||
|
||||
(item.getUnitName() != null && item.getUnitName().contains(keyWord)) ||
|
||||
(item.getProName() != null && item.getProName().contains(keyWord)) ||
|
||||
(item.getPhone() != null && item.getPhone().contains(keyWord));
|
||||
(item.getPhone() != null && item.getPhone().contains(keyWord)) ||
|
||||
(item.getImpUnitName() != null && item.getImpUnitName().contains(keyWord));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public class SelectController {
|
|||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "获取分公司下拉选")
|
||||
@GetMapping("/getImpUnitNameList")
|
||||
@GetMapping("getImpUnitNameList")
|
||||
public AjaxResult getImpUnitNameList(MaterialRetainedEquipmentInfo bean) {
|
||||
List<MaterialRetainedEquipmentInfo> list = service.getImpUnitNameList(bean);
|
||||
return AjaxResult.success(list);
|
||||
|
|
|
|||
|
|
@ -703,6 +703,10 @@ public class SelectServiceImpl implements SelectService {
|
|||
|
||||
if (CollectionUtils.isNotEmpty(list)) {
|
||||
groupList = buildTreeEfficiently(list);
|
||||
List<ProjectTreeNode> newList = mapper.getTeam();
|
||||
if (CollectionUtils.isNotEmpty(newList) && !bmUnit.isEnableFilterTeam()) {
|
||||
groupList.addAll(newList);
|
||||
}
|
||||
}
|
||||
} catch (Exception e) {
|
||||
log.error("单位类型树-查询失败", e);
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import cn.hutool.core.convert.Convert;
|
|||
import com.bonus.common.biz.annotation.StoreLog;
|
||||
import com.bonus.common.biz.config.ListPagingUtil;
|
||||
import com.bonus.common.biz.domain.repair.RepairInputExportDetails;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.back.domain.vo.MaCodeVo;
|
||||
|
|
@ -57,17 +58,45 @@ public class RepairInputDetailsController extends BaseController {
|
|||
return AjaxResult.success(ListPagingUtil.paging(pageIndex, pageSize, list));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "导出修试后入库列表")
|
||||
@PostMapping("/exportInfo")
|
||||
public void exportInfo(HttpServletResponse response, RepairInputDetails repairInputDetails) {
|
||||
String fileName = "修试后入库列表";
|
||||
if (repairInputDetails.getStartTime() != null && repairInputDetails.getEndTime() != null) {
|
||||
fileName = "修试后入库列表"+ "(时间" +repairInputDetails.getStartTime() + "至" + repairInputDetails.getEndTime()+ ")";
|
||||
}
|
||||
List<RepairInputDetails> list = repairInputDetailsService.selectRepairInputDetailsList(repairInputDetails);
|
||||
// 根据list集合数,去填充序号
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setSeq(i + 1);
|
||||
}
|
||||
ExcelUtil<RepairInputDetails> util = new ExcelUtil<>(RepairInputDetails.class);
|
||||
// 获取当前年月日时分秒导出时间,用括号拼接在后面
|
||||
String title = "修试后入库列表" + "(" + "导出时间:" + DateUtils.getTime() + ")";
|
||||
util.exportExcel(response, list, fileName, title);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出修试后入库列表
|
||||
*/
|
||||
@ApiOperation(value = "导出修试后入库列表")
|
||||
@ApiOperation(value = "导出修试后入库明细列表")
|
||||
@PreventRepeatSubmit
|
||||
@SysLog(title = "修试后入库", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出修试后入库")
|
||||
@SysLog(title = "修试后入库明细", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出修试后入库明细")
|
||||
@PostMapping("/export")
|
||||
public void export(HttpServletResponse response, RepairInputDetails repairInputDetails) {
|
||||
String fileName = "修试后入库明细";
|
||||
if (repairInputDetails.getStartTime() != null && repairInputDetails.getEndTime() != null) {
|
||||
fileName = "修试后入库明细"+ "(时间" +repairInputDetails.getStartTime() + "至" + repairInputDetails.getEndTime()+ ")";
|
||||
}
|
||||
List<RepairInputExportDetails> list = repairInputDetailsService.selectExportDetails(repairInputDetails);
|
||||
ExcelUtil<RepairInputExportDetails> util = new ExcelUtil<RepairInputExportDetails>(RepairInputExportDetails.class);
|
||||
util.exportExcel(response, list, "修试后入库数据");
|
||||
// 根据list集合数,去填充序号
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
list.get(i).setSeq(i + 1);
|
||||
}
|
||||
ExcelUtil<RepairInputExportDetails> util = new ExcelUtil<>(RepairInputExportDetails.class);
|
||||
// 获取当前年月日时分秒导出时间,用括号拼接在后面
|
||||
String title = "修试后入库明细" + "(" + "导出时间:" + DateUtils.getTime() + ")";
|
||||
util.exportExcel(response, list, fileName, title);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.bonus.common.core.annotation.Excel;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
|
@ -83,13 +84,13 @@ public class RepairAuditDetailsExport {
|
|||
* 维修总量
|
||||
*/
|
||||
@ApiModelProperty(value = "维修总量")
|
||||
@Excel(name = "退料数量",sort = 5)
|
||||
@Excel(name = "退料数量",sort = 5, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT)
|
||||
private BigDecimal repairNum;
|
||||
/**
|
||||
* 维修报废数量
|
||||
*/
|
||||
@ApiModelProperty(value = "报废数量")
|
||||
@Excel(name = "报废数量",sort = 7)
|
||||
@Excel(name = "报废数量",sort = 7, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT)
|
||||
private BigDecimal scrapNum;
|
||||
@ApiModelProperty(value = "待维修数量")
|
||||
private BigDecimal beRepairedNum;
|
||||
|
|
@ -147,7 +148,7 @@ public class RepairAuditDetailsExport {
|
|||
* 维修合格数量
|
||||
*/
|
||||
@ApiModelProperty(value = "维修合格数量")
|
||||
@Excel(name = "合格数量",sort = 6)
|
||||
@Excel(name = "合格数量",sort = 6, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT)
|
||||
private BigDecimal repairedNum;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import com.bonus.common.core.annotation.Excel;
|
|||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.apache.poi.ss.usermodel.HorizontalAlignment;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
|
@ -41,44 +42,48 @@ public class RepairDetailsExport {
|
|||
private Long parentId;
|
||||
|
||||
@ApiModelProperty(value = "序号")
|
||||
@Excel(name = "序号", isSequence = true, sort = 0)
|
||||
@Excel(name = "序号", isSequence = true, sort = 0, width = 5)
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty(value = "分公司")
|
||||
@Excel(name = "分公司",sort = 1)
|
||||
private String impUnitName;
|
||||
|
||||
/**
|
||||
* 退料单位名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料单位名称")
|
||||
@Excel(name = "退料单位名称",sort = 4)
|
||||
@Excel(name = "退料单位名称",sort = 5)
|
||||
private String backUnit;
|
||||
/**
|
||||
* 退料工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料工程名称")
|
||||
@Excel(name = "退料工程名称",sort = 5)
|
||||
@Excel(name = "退料工程名称",sort = 6)
|
||||
private String backPro;
|
||||
/**
|
||||
* 退料单号
|
||||
*/
|
||||
@ApiModelProperty(value = "退料单号")
|
||||
@Excel(name = "退料单号",sort = 3)
|
||||
@Excel(name = "退料单号",sort = 4)
|
||||
private String backCode;
|
||||
/**
|
||||
* 维修单号
|
||||
*/
|
||||
@ApiModelProperty(value = "维修单号")
|
||||
@Excel(name = "维修单号",sort = 2)
|
||||
@Excel(name = "维修单号",sort = 3)
|
||||
private String repairCode;
|
||||
/**
|
||||
* 维修机具类型
|
||||
*/
|
||||
@ApiModelProperty(value = "维修机具类型")
|
||||
@Excel(name = "机具名称",sort = 6)
|
||||
@Excel(name = "机具名称",sort = 7)
|
||||
private String type;
|
||||
/**
|
||||
* 规格型号
|
||||
*/
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号",sort = 7)
|
||||
@Excel(name = "规格型号",sort = 8)
|
||||
private String typeName;
|
||||
@ApiModelProperty(value = "退料数量")
|
||||
private BigDecimal returnNum;
|
||||
|
|
@ -86,13 +91,13 @@ public class RepairDetailsExport {
|
|||
* 维修总量
|
||||
*/
|
||||
@ApiModelProperty(value = "维修总量")
|
||||
@Excel(name = "维修数量",sort = 10)
|
||||
@Excel(name = "维修数量",sort = 11, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT)
|
||||
private BigDecimal repairNum;
|
||||
/**
|
||||
* 维修报废数量
|
||||
*/
|
||||
@ApiModelProperty(value = "报废数量")
|
||||
@Excel(name = "报废数量",sort = 12)
|
||||
@Excel(name = "报废数量",sort = 13, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT)
|
||||
private BigDecimal scrapNum;
|
||||
@ApiModelProperty(value = "待维修数量")
|
||||
private BigDecimal beRepairedNum;
|
||||
|
|
@ -115,7 +120,7 @@ public class RepairDetailsExport {
|
|||
* 维修状态
|
||||
*/
|
||||
@ApiModelProperty(value = "维修状态")
|
||||
@Excel(name = "维修状态",sort = 9)
|
||||
@Excel(name = "维修状态",sort = 10)
|
||||
private String repairStatus;
|
||||
/**
|
||||
* 关键字
|
||||
|
|
@ -150,7 +155,7 @@ public class RepairDetailsExport {
|
|||
* 维修合格数量
|
||||
*/
|
||||
@ApiModelProperty(value = "维修合格数量")
|
||||
@Excel(name = "维修合格数量",sort = 11)
|
||||
@Excel(name = "维修合格数量",sort = 12, cellType = Excel.ColumnType.NUMERIC, align = HorizontalAlignment.RIGHT)
|
||||
private BigDecimal repairedNum;
|
||||
|
||||
/**
|
||||
|
|
@ -216,13 +221,13 @@ public class RepairDetailsExport {
|
|||
/**
|
||||
* 维修完成时间
|
||||
*/
|
||||
@Excel(name = "维修时间",sort = 1)
|
||||
@Excel(name = "维修时间",sort = 2)
|
||||
private String repairTime;
|
||||
|
||||
/**
|
||||
* 单位
|
||||
*/
|
||||
@Excel(name = "单位",sort = 8)
|
||||
@Excel(name = "单位",sort = 9)
|
||||
private String unit;
|
||||
|
||||
@ApiModelProperty(value = "单位id")
|
||||
|
|
|
|||
|
|
@ -41,38 +41,42 @@ public class RepairTask {
|
|||
private Long parentId;
|
||||
|
||||
@ApiModelProperty(value = "序号")
|
||||
@Excel(name = "序号", isSequence = true, sort = 0)
|
||||
@Excel(name = "序号", isSequence = true, width = 5)
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty(value = "分公司")
|
||||
@Excel(name = "分公司")
|
||||
private String impUnitName;
|
||||
|
||||
/**
|
||||
* 退料单位名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料单位名称")
|
||||
@Excel(name = "退料单位名称",sort = 1)
|
||||
@Excel(name = "退料单位名称")
|
||||
private String backUnit;
|
||||
/**
|
||||
* 退料工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "退料工程名称")
|
||||
@Excel(name = "退料工程名称",sort = 2)
|
||||
@Excel(name = "退料工程名称")
|
||||
private String backPro;
|
||||
/**
|
||||
* 退料单号
|
||||
*/
|
||||
@ApiModelProperty(value = "退料单号")
|
||||
@Excel(name = "退料单号",sort = 3)
|
||||
@Excel(name = "退料单号")
|
||||
private String backCode;
|
||||
/**
|
||||
* 维修单号
|
||||
*/
|
||||
@ApiModelProperty(value = "维修单号")
|
||||
@Excel(name = "维修单号",sort = 4)
|
||||
@Excel(name = "维修单号")
|
||||
private String repairCode;
|
||||
/**
|
||||
* 维修机具类型
|
||||
*/
|
||||
@ApiModelProperty(value = "维修机具类型")
|
||||
@Excel(name = "物资名称",sort = 5)
|
||||
@Excel(name = "物资名称")
|
||||
private String type;
|
||||
/**
|
||||
* 规格型号
|
||||
|
|
@ -102,13 +106,13 @@ public class RepairTask {
|
|||
* 任务创建人
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建人")
|
||||
@Excel(name = "创建人",sort = 6)
|
||||
@Excel(name = "创建人")
|
||||
private String createName;
|
||||
/**
|
||||
* 任务创建时间
|
||||
*/
|
||||
@ApiModelProperty(value = "任务创建时间")
|
||||
@Excel(name = "创建时间",sort = 7)
|
||||
@Excel(name = "创建时间")
|
||||
private String createTime;
|
||||
/**
|
||||
* 任务创建人
|
||||
|
|
@ -141,7 +145,7 @@ public class RepairTask {
|
|||
private Long agreementId;
|
||||
|
||||
@ApiModelProperty(value = "维修状态编码CODE")
|
||||
@Excel(name = "维修状态",sort = 8,readConverterExp = "0=定损进行中,1=维修完成,2=驳回至退料,4=维修进行中")
|
||||
@Excel(name = "维修状态",readConverterExp = "0=定损进行中,1=维修完成,2=驳回至退料,4=维修进行中")
|
||||
private String repairStatusCode;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -25,26 +25,36 @@ public class ScrapApplyDetailsVO {
|
|||
// @Excel(name = "任务单号",sort = 4)
|
||||
private String scrapNum;
|
||||
|
||||
@ApiModelProperty(value = "维修任务单号")
|
||||
@Excel(name = "任务单号",sort = 4)
|
||||
private String repairTaskCode;
|
||||
|
||||
@ApiModelProperty(value = "序号")
|
||||
@Excel(name = "序号", isSequence = true, sort = 0)
|
||||
@Excel(name = "序号", isSequence = true, width = 5, sort = 0)
|
||||
private String serialNumber;
|
||||
|
||||
@ApiModelProperty(value = "分公司")
|
||||
@Excel(name = "分公司")
|
||||
private String impUnitName;
|
||||
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
@Excel(name = "退料单位",sort = 1)
|
||||
@Excel(name = "退料单位")
|
||||
private String unitName;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@Excel(name = "退料工程",sort = 2)
|
||||
@Excel(name = "退料工程")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 维修单号
|
||||
*/
|
||||
@Excel(name = "维修审核单号")
|
||||
private String repairNum;
|
||||
|
||||
@ApiModelProperty(value = "维修任务单号")
|
||||
@Excel(name = "任务单号")
|
||||
private String repairTaskCode;
|
||||
|
||||
// @Excel(name = "退料单号",sort = 3)
|
||||
private String backCode;
|
||||
|
||||
|
|
@ -78,34 +88,28 @@ public class ScrapApplyDetailsVO {
|
|||
@ApiModelProperty(value = "维修班组")
|
||||
private String teamName;
|
||||
|
||||
/**
|
||||
* 任务创建人
|
||||
*/
|
||||
@Excel(name = "提交人",sort = 6)
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 机具类型
|
||||
*/
|
||||
@Excel(name = "物资类型",sort = 5)
|
||||
@Excel(name = "物资类型")
|
||||
private String itemType;
|
||||
|
||||
/**
|
||||
* 任务创建人
|
||||
*/
|
||||
@Excel(name = "提交人")
|
||||
private String createBy;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "提交时间",sort = 7)
|
||||
@Excel(name = "提交时间")
|
||||
private String createTime;
|
||||
|
||||
/**
|
||||
* 维修单号
|
||||
*/
|
||||
@Excel(name = "维修审核单号",sort = 3)
|
||||
private String repairNum;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@Excel(name = "状态",sort = 8,readConverterExp = "10=维修审核进行中,11=维修审核完成,12=维修审核被驳回")
|
||||
@Excel(name = "状态",readConverterExp = "10=维修审核进行中,11=维修审核完成,12=维修审核被驳回")
|
||||
private Integer taskStatus;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -138,11 +138,6 @@ public class RepairAuditDetailsServiceImpl implements IRepairAuditDetailsService
|
|||
public List<ScrapApplyDetailsVO> selectRepairQuestList(RepairAuditDetails repairAuditDetails) {
|
||||
try {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
/*// 首先根据用户名去ma_type_manage表查询是否存在绑定物资信息
|
||||
List<Long> typeIdList = backApplyInfoMapper.selectTypeIdList(userId);
|
||||
if (CollectionUtils.isEmpty(typeIdList)) {
|
||||
repairAuditDetails.setUserId(userId == 0 ? null : userId);
|
||||
}*/
|
||||
Set<String> userRoles = SecurityUtils.getLoginUser().getRoles();
|
||||
// 检查用户是否具有特殊角色
|
||||
boolean hasSpecialRole = hasSpecialRole(userRoles);
|
||||
|
|
|
|||
|
|
@ -108,11 +108,6 @@ public class RepairServiceImpl implements RepairService {
|
|||
@Override
|
||||
public List<RepairTask> getRepairTaskList(RepairTask bean) {
|
||||
Long userId = SecurityUtils.getLoginUser().getUserid();
|
||||
// 首先根据用户名去ma_type_manage表查询是否存在绑定物资信息
|
||||
/*List<Long> typeIdList = backApplyInfoMapper.selectTypeIdList(userId);
|
||||
if (CollectionUtils.isEmpty(typeIdList)) {
|
||||
bean.setUserId(userId == 0 ? null : userId);
|
||||
}*/
|
||||
Set<String> userRoles = SecurityUtils.getLoginUser().getRoles();
|
||||
// 检查用户是否具有特殊角色
|
||||
boolean hasSpecialRole = hasSpecialRole(userRoles);
|
||||
|
|
@ -128,26 +123,6 @@ public class RepairServiceImpl implements RepairService {
|
|||
repairTask.setNum(task.getNum());
|
||||
}
|
||||
}
|
||||
/*if (CollectionUtil.isNotEmpty(typeIdList)) {
|
||||
// 使用流过滤符合条件的元素
|
||||
list = list.stream()
|
||||
.filter(item -> {
|
||||
String firstIdStr = item.getFirstId();
|
||||
if (firstIdStr == null) {
|
||||
return false;
|
||||
}
|
||||
// 将逗号分隔的字符串转为集合
|
||||
Set<Long> firstIds = Arrays.stream(firstIdStr.split(","))
|
||||
.map(String::trim)
|
||||
.filter(s -> !s.isEmpty())
|
||||
.map(Long::parseLong)
|
||||
.collect(Collectors.toSet());
|
||||
|
||||
// 判断两个集合是否有交集
|
||||
return firstIds.stream().anyMatch(typeIdList::contains);
|
||||
})
|
||||
.collect(Collectors.toList());
|
||||
}*/
|
||||
String keyWord = bean.getKeyWord();
|
||||
// 如果关键字不为空,进行过滤
|
||||
if (!StringUtils.isBlank(keyWord)) {
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bai.confirm_time as confirmTime,
|
||||
bai.is_confirm as isConfirm,
|
||||
bai.confirm_remark as confirmRemark,
|
||||
SUM(bad.pre_num) as backNum
|
||||
SUM(bad.pre_num) as backNum,
|
||||
sd.dept_name as impUnitName
|
||||
FROM
|
||||
back_apply_info bai
|
||||
LEFT JOIN back_apply_details bad on bad.parent_id = bai.id
|
||||
|
|
@ -76,6 +77,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
|
||||
left join sys_user su on su.user_id = bai.material_man
|
||||
left join sys_user su1 on su1.user_id = bai.create_by
|
||||
left join sys_dept sd on sd.dept_id = bp.imp_unit
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_repair mtr ON mtr.type_id = bad.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
@ -1813,7 +1815,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
bcd.is_finished AS status,
|
||||
bcd.remark AS remark,
|
||||
tt.task_status AS taskStatus,
|
||||
bai2.phone AS phone
|
||||
bai2.phone AS phone,
|
||||
sd.dept_name AS impUnitName
|
||||
FROM
|
||||
back_check_details bcd
|
||||
LEFT JOIN back_apply_info bai2 ON bcd.parent_id = bai2.id
|
||||
|
|
@ -1825,6 +1828,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN ma_type mt ON bcd.type_id = mt.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = bcd.ma_id
|
||||
LEFT JOIN sys_dept sd ON sd.dept_id = bp2.imp_unit
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_repair mtr ON mtr.type_id = bcd.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -558,13 +558,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
<select id="getTeam" resultType="com.bonus.common.biz.domain.ProjectTreeNode">
|
||||
SELECT
|
||||
DISTINCT bu.unit_id as id,
|
||||
bu.unit_name AS name
|
||||
DISTINCT bu.unit_id AS id,
|
||||
CONCAT(bu.unit_name, '(身份证后四位:', RIGHT(bzz_idcard, 4), ')') AS name
|
||||
FROM
|
||||
bm_unit bu
|
||||
WHERE
|
||||
bu.del_flag = '0'
|
||||
and bu.type_id = 1731
|
||||
AND bu.type_id = 1731
|
||||
</select>
|
||||
|
||||
<select id="getTeamLeaseList" resultType="com.bonus.common.biz.domain.ProjectTreeNode">
|
||||
|
|
@ -1217,11 +1217,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
FROM bm_project bp
|
||||
WHERE bp.pro_id IS NOT NULL
|
||||
AND bp.pro_id IN (
|
||||
SELECT bai.project_id
|
||||
FROM bm_agreement_info bai
|
||||
INNER JOIN slt_agreement_info sai ON bai.agreement_id = sai.agreement_id
|
||||
WHERE sai.is_slt = 0
|
||||
and bai.is_show != 0
|
||||
SELECT project_id
|
||||
FROM bm_agreement_info
|
||||
WHERE is_slt = 0
|
||||
and is_show != 0
|
||||
)
|
||||
<!-- SELECT DISTINCT bp.pro_id as proId-->
|
||||
<!-- FROM bm_project bp-->
|
||||
|
|
|
|||
|
|
@ -341,7 +341,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
tk.remark,
|
||||
tk.CODE AS repairNum,
|
||||
rad.audit_time as auditTime,
|
||||
GROUP_CONCAT(DISTINCT mt4.type_id) AS firstId
|
||||
GROUP_CONCAT(DISTINCT mt4.type_id) AS firstId,
|
||||
sd.dept_name as impUnitName
|
||||
FROM
|
||||
tm_task tk
|
||||
LEFT JOIN tm_task tt ON tk.pre_task_id = tt.task_id
|
||||
|
|
@ -356,6 +357,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN sys_user su ON su.user_id = tk.create_by
|
||||
LEFT JOIN ma_type mt3 ON mt1.parent_id = mt3.type_id AND mt3.del_flag = '0'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.del_flag = '0'
|
||||
left join sys_dept sd on sd.dept_id = bpl.imp_unit
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_repair mtr ON mtr.type_id = rad.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
@ -404,7 +406,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
tk.remark,
|
||||
tk.CODE AS repairNum,
|
||||
rad.audit_time as auditTime,
|
||||
GROUP_CONCAT(DISTINCT mt4.type_id) AS firstId
|
||||
GROUP_CONCAT(DISTINCT mt4.type_id) AS firstId,
|
||||
sd.dept_name as impUnitName
|
||||
FROM
|
||||
tm_task tk
|
||||
LEFT JOIN tm_task tt ON tk.pre_task_id = tt.task_id
|
||||
|
|
@ -418,6 +421,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN sys_user su ON su.user_id = tk.create_by
|
||||
LEFT JOIN ma_type mt3 ON mt1.parent_id = mt3.type_id AND mt3.del_flag = '0'
|
||||
LEFT JOIN ma_type mt4 ON mt3.parent_id = mt4.type_id AND mt4.del_flag = '0'
|
||||
left join sys_dept sd on sd.dept_id = bpl.imp_unit
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_repair mtr ON mtr.type_id = rad.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -50,7 +50,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SUM(IFNULL(rd.input_num, 0)) as inputNum,
|
||||
GROUP_CONCAT(DISTINCT mt2.type_name) AS materialType,
|
||||
tta.agreement_id as agreementId,
|
||||
GROUP_CONCAT( DISTINCT mt4.type_id) as firstId
|
||||
GROUP_CONCAT( DISTINCT mt4.type_id) as firstId,
|
||||
sd.dept_name as impUnitName
|
||||
FROM
|
||||
repair_input_details rd
|
||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||
|
|
@ -74,6 +75,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_user su on rd.create_by = su.user_id
|
||||
left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0'
|
||||
left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
|
||||
left join sys_dept sd on sd.dept_id = bpi.imp_unit
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
@ -111,7 +113,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SUM(IFNULL(rd.input_num, 0)) as inputNum,
|
||||
GROUP_CONCAT(DISTINCT mt2.type_name) AS materialType,
|
||||
tta.agreement_id as agreementId,
|
||||
GROUP_CONCAT( DISTINCT mt4.type_id) as firstId
|
||||
GROUP_CONCAT( DISTINCT mt4.type_id) as firstId,
|
||||
sd.dept_name as impUnitName
|
||||
FROM
|
||||
repair_input_details rd
|
||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||
|
|
@ -127,6 +130,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_user su on rd.create_by = su.user_id
|
||||
left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0'
|
||||
left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
|
||||
left join sys_dept sd on sd.dept_id = bpi.imp_unit
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
@ -621,7 +625,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
IFNULL(rd.reject_num,0) as rejectNum,
|
||||
mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
mm.ma_code AS maCode
|
||||
mm.ma_code AS maCode,
|
||||
sd.dept_name as impUnitName
|
||||
FROM
|
||||
repair_input_details rd
|
||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||
|
|
@ -644,6 +649,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_unit bui ON bai2.unit_id = bui.unit_id
|
||||
LEFT JOIN bm_project bpi ON bai2.project_id = bpi.pro_id and bpi.del_flag = '0'
|
||||
left join sys_user su on rd.create_by = su.user_id
|
||||
left join sys_dept sd on sd.dept_id = bpi.imp_unit
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
@ -689,7 +695,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
IFNULL(rd.reject_num,0) as rejectNum,
|
||||
mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
mm.ma_code AS maCode
|
||||
mm.ma_code AS maCode,
|
||||
sd.dept_name as impUnitName
|
||||
FROM
|
||||
repair_input_details rd
|
||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||
|
|
@ -704,6 +711,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEFT JOIN bm_unit bui ON bai2.unit_id = bui.unit_id
|
||||
LEFT JOIN bm_project bpi ON bai2.project_id = bpi.pro_id and bpi.del_flag = '0'
|
||||
left join sys_user su on rd.create_by = su.user_id
|
||||
left join sys_dept sd on sd.dept_id = bpi.imp_unit
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_keeper mtr ON mtr.type_id = rd.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
|
|||
|
|
@ -287,7 +287,8 @@
|
|||
GROUP_CONCAT(DISTINCT mt4.type_id) as firstId,
|
||||
rd.status as dataStatus,
|
||||
rad2.num,
|
||||
rd.back_id as backId
|
||||
rd.back_id as backId,
|
||||
sd.dept_name as impUnitName
|
||||
FROM
|
||||
repair_apply_details rd
|
||||
LEFT JOIN ma_type mt on rd.type_id = mt.type_id
|
||||
|
|
@ -302,6 +303,7 @@
|
|||
left join sys_user su2 on su2.user_id = rd.repairer
|
||||
left join ma_type mt3 ON mt2.parent_id = mt3.type_id and mt3.del_flag = '0'
|
||||
left join ma_type mt4 ON mt3.parent_id = mt4.type_id and mt4.del_flag = '0'
|
||||
left join sys_dept sd on sd.dept_id = bpi.imp_unit
|
||||
LEFT JOIN (
|
||||
SELECT
|
||||
task_id,
|
||||
|
|
@ -1676,7 +1678,8 @@
|
|||
sda.dict_label as repairStatus,
|
||||
SUM(rad.repair_num) as repairNum,
|
||||
SUM(rad.repaired_num) as repairedNum,
|
||||
SUM(rad.scrap_num) as scrapNum
|
||||
SUM(rad.scrap_num) as scrapNum,
|
||||
sd.dept_name as impUnitName
|
||||
FROM
|
||||
repair_apply_details rad
|
||||
LEFT JOIN tm_task tt on tt.task_id=rad.task_id
|
||||
|
|
@ -1688,6 +1691,7 @@
|
|||
LEFT JOIN back_apply_info bai ON rad.back_id = bai.id
|
||||
LEFT JOIN ma_type mt on mt.type_id=rad.type_id
|
||||
LEFT JOIN ma_type mt2 on mt2.type_id=mt.parent_id
|
||||
LEFT JOIN sys_dept sd on sd.dept_id = bpi.imp_unit
|
||||
<if test="userId != null">
|
||||
JOIN ma_type_repair mtr ON mtr.type_id = rad.type_id AND mtr.user_id = #{userId}
|
||||
</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue