Merge remote-tracking branch 'origin/dev-cq' into dev-cq
This commit is contained in:
commit
29c3ede63c
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.sgzb.material.domain;
|
||||
package com.bonus.sgzb.base.api.domain;
|
||||
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
||||
|
|
@ -9,33 +9,20 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @description 退料
|
||||
* @author hay
|
||||
* @date 2023/12/20 11:56
|
||||
*/
|
||||
* 退料
|
||||
* @author bns_han
|
||||
*/
|
||||
@Data
|
||||
public class BackApplyInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 退料ID */
|
||||
/**
|
||||
* 退料id
|
||||
*/
|
||||
@ApiModelProperty(value = "退料ID")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value="工程id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 任务ID
|
||||
*/
|
||||
private Integer parentId;
|
||||
private String badId;
|
||||
private String[] split;
|
||||
|
||||
private List<MachinePart> maTypeDetails;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@ApiModelProperty(value="工程名称")
|
||||
private String proName;
|
||||
|
||||
|
|
@ -49,58 +36,21 @@ public class BackApplyInfo extends BaseEntity {
|
|||
*/
|
||||
@ApiModelProperty(value = "装备管理方式名称")
|
||||
private String manageTypeName;
|
||||
|
||||
/**
|
||||
* 机具管理方式
|
||||
*/
|
||||
private String manageType;
|
||||
|
||||
private int flag;
|
||||
|
||||
private BackApplyInfo[] arr;
|
||||
|
||||
private Integer maId;
|
||||
|
||||
/**
|
||||
* 退料状态
|
||||
*/
|
||||
private String backStatus;
|
||||
|
||||
/**
|
||||
* 退料数量
|
||||
*/
|
||||
private Integer backNum;
|
||||
|
||||
private Integer directNum;
|
||||
|
||||
/** 退料单号 */
|
||||
@Excel(name = "退料单号")
|
||||
@ApiModelProperty(value = "退料单号")
|
||||
private String code;
|
||||
|
||||
@Excel(name = "退料单位名称")
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
|
||||
@Excel(name = "退料工程名称")
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String lotName;
|
||||
|
||||
@Excel(name = "退料工机具类型")
|
||||
@ApiModelProperty(value = "类型名称")
|
||||
private String typeName;
|
||||
|
||||
@Excel(name = "规格型号")
|
||||
@ApiModelProperty(value = "规格编号")
|
||||
private String typeCode;
|
||||
|
||||
/** 退料人员 */
|
||||
@Excel(name = "退料人员")
|
||||
@ApiModelProperty(value = "退料人员")
|
||||
private String backPerson;
|
||||
|
||||
/** 联系电话 */
|
||||
@Excel(name = "退料人联系电话")
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private String phone;
|
||||
|
||||
|
||||
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
|
|
@ -118,22 +68,158 @@ public class BackApplyInfo extends BaseEntity {
|
|||
@ApiModelProperty(value = "签订日期")
|
||||
private String signTime;
|
||||
|
||||
@Excel(name = "退料申请时间")
|
||||
|
||||
/**
|
||||
* 退料人
|
||||
*/
|
||||
private String userName;
|
||||
private String badId;
|
||||
private String[] split;
|
||||
private String[] typeIds;
|
||||
|
||||
@Excel(name = "退料状态",sort = 9)
|
||||
private String taskName;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@Excel(name = "联系电话",sort = 6)
|
||||
@ApiModelProperty(value = "联系电话")
|
||||
private String phone;
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@Excel(name = "退料工程",sort = 3)
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String lotName;
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
@Excel(name = "退料单位",sort = 2)
|
||||
@ApiModelProperty(value = "单位名称")
|
||||
private String unitName;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String planStartTime;
|
||||
|
||||
|
||||
private String modelId;
|
||||
|
||||
private List<MachinePart> maTypeDetails;
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@Excel(name = "退料机具",sort = 4)
|
||||
@ApiModelProperty(value = "类型名称")
|
||||
private String typeName;
|
||||
/**
|
||||
* 协议号
|
||||
*/
|
||||
@Excel(name = "协议号",sort = 8)
|
||||
@ApiModelProperty(value = "协议编号")
|
||||
private String agreementCode;
|
||||
/**
|
||||
* 规格编号
|
||||
*/
|
||||
@Excel(name = "规格型号")
|
||||
@ApiModelProperty(value = "规格编号")
|
||||
private String typeCode;
|
||||
|
||||
|
||||
|
||||
|
||||
@Excel(name = "退料单号",sort = 1)
|
||||
@ApiModelProperty(value = "退料单号")
|
||||
private String code;
|
||||
|
||||
@Excel(name = "退料人员",sort = 5)
|
||||
@ApiModelProperty(value = "退料人员")
|
||||
private String backPerson;
|
||||
|
||||
|
||||
@Excel(name = "申请时间",sort = 7)
|
||||
@ApiModelProperty(value = "退料日期")
|
||||
private String backTime;
|
||||
|
||||
@Excel(name = "协议号")
|
||||
@ApiModelProperty(value = "协议编号")
|
||||
private String agreementCode;
|
||||
|
||||
private String type;
|
||||
/**
|
||||
* 合格数量
|
||||
*/
|
||||
private Integer passNum;
|
||||
/**
|
||||
* 维修数量
|
||||
*/
|
||||
private Integer maintenanceNum;
|
||||
/**
|
||||
* 报废数量
|
||||
*/
|
||||
private Integer scrapNum;
|
||||
|
||||
/**
|
||||
* 退料数量
|
||||
*/
|
||||
private Integer backNum;
|
||||
|
||||
/**
|
||||
* 退料状态
|
||||
*/
|
||||
private String backStatus;
|
||||
|
||||
/**
|
||||
* 合格入库数量
|
||||
*/
|
||||
private String inputNum;
|
||||
|
||||
|
||||
|
||||
|
||||
private BackApplyInfo info;
|
||||
|
||||
|
||||
private Integer parentId;
|
||||
private String sdStatus;
|
||||
private String sdId;
|
||||
/**
|
||||
* 二维码编码
|
||||
*/
|
||||
private String qrCode;
|
||||
/**
|
||||
* rfid编码
|
||||
*/
|
||||
private String rfidCode;
|
||||
private String repairedNum;
|
||||
private String backId;
|
||||
private String repairer;
|
||||
|
||||
|
||||
private Integer flag;
|
||||
private Integer partNum;
|
||||
/**
|
||||
* 合格数量
|
||||
*/
|
||||
private Integer hgNum;
|
||||
/**
|
||||
* 维修数量
|
||||
*/
|
||||
private Integer wxNum;
|
||||
/**
|
||||
* 报废数量
|
||||
*/
|
||||
private Integer bfNum;
|
||||
|
||||
|
||||
|
||||
@Excel(name = "退料状态" , readConverterExp = "37=待退料审核,38=退料已审核,39=退料核查中,40=退料完成,101 = 退料审核驳回")
|
||||
@ApiModelProperty(value = "任务状态")
|
||||
private String taskStatus;
|
||||
|
||||
|
||||
/** 机具公司审核人 */
|
||||
@ApiModelProperty(value = "机具公司审核人")
|
||||
private Integer directAuditBy;
|
||||
|
||||
|
||||
/** 机具公司审批时间 */
|
||||
@ApiModelProperty(value = "机具公司审批时间")
|
||||
private String directAuditTime;
|
||||
|
|
@ -174,6 +260,12 @@ public class BackApplyInfo extends BaseEntity {
|
|||
private Integer lotId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ApiModelProperty(value = "单位id")
|
||||
private Integer unitId;
|
||||
@ApiModelProperty(value = "计量单位")
|
||||
|
|
@ -193,9 +285,11 @@ public class BackApplyInfo extends BaseEntity {
|
|||
private String detailsIdByNum;
|
||||
|
||||
@ApiModelProperty(value = "类型id和数量")
|
||||
|
||||
private String typeIdByNum;
|
||||
|
||||
@ApiModelProperty(value = "详情id")
|
||||
|
||||
private String detailsId;
|
||||
|
||||
@ApiModelProperty(value = "编码")
|
||||
|
|
@ -238,10 +332,15 @@ public class BackApplyInfo extends BaseEntity {
|
|||
@ApiModelProperty(value="退料任务实体集合")
|
||||
private List<BackApplyInfo> backApplyDetails;
|
||||
|
||||
/**审核状态*/
|
||||
@ApiModelProperty(value="同一退料单中不同器具状态")
|
||||
private String status;
|
||||
|
||||
private String guigeCn;
|
||||
|
||||
/**
|
||||
* 退料数量
|
||||
*/
|
||||
private String preNum;
|
||||
private String auditNum;
|
||||
private String typeCn;
|
||||
|
|
@ -252,4 +351,6 @@ public class BackApplyInfo extends BaseEntity {
|
|||
|
||||
private int viewWeb;
|
||||
|
||||
/** 操作后库存 */
|
||||
private int postStoreNum;
|
||||
}
|
||||
|
|
@ -160,4 +160,9 @@ public class LeaseOutDetails implements Serializable {
|
|||
@ApiModelProperty(value = "0工程1长期")
|
||||
private String leaseType;
|
||||
|
||||
@ApiModelProperty(value = "数量出库 -> 操作前库存量")
|
||||
private Integer num;
|
||||
|
||||
/** 操作后库存 */
|
||||
private int postStoreNum;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package com.bonus.sgzb.app.domain;
|
||||
package com.bonus.sgzb.base.api.domain;
|
||||
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
@ -283,46 +283,46 @@ public class LogAspect
|
|||
// }
|
||||
// }
|
||||
// 领料出库
|
||||
// if (joinPoint.getArgs()[0] instanceof List &&
|
||||
// ((List) joinPoint.getArgs()[0]).stream().noneMatch((o -> !(o instanceof LeaseOutDetails)))) {
|
||||
// List<LeaseOutDetails> leaseOutDetails = (List<LeaseOutDetails>)joinPoint.getArgs()[0];
|
||||
// for (LeaseOutDetails lod : leaseOutDetails) {
|
||||
// BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
// bmStorageLog.setTaskId(String.valueOf(lod.getTaskId()));
|
||||
// bmStorageLog.setTypeId(lod.getTypeId());
|
||||
// bmStorageLog.setTypeName(lod.getMaCode());
|
||||
// bmStorageLog.setPreStoreNum(lod.getNum());
|
||||
// bmStorageLog.setOutNum(Objects.isNull(lod.getInputNum()) ? 0 : lod.getInputNum().intValue());
|
||||
// bmStorageLog.setPostStoreNum(lod.getPostStoreNum());
|
||||
// bmStorageLogList.add(bmStorageLog);
|
||||
// }
|
||||
// }
|
||||
// if (joinPoint.getArgs()[0] instanceof LeaseOutDetails) {
|
||||
// LeaseOutDetails lod = (LeaseOutDetails)joinPoint.getArgs()[0];
|
||||
// BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
// bmStorageLog.setTaskId(String.valueOf(lod.getTaskId()));
|
||||
// bmStorageLog.setTypeId(lod.getTypeId());
|
||||
// bmStorageLog.setTypeName(lod.getMaCode());
|
||||
// bmStorageLog.setPreStoreNum(lod.getNum());
|
||||
// bmStorageLog.setOutNum(Objects.isNull(lod.getInputNum()) ? 0 : lod.getInputNum().intValue());
|
||||
// bmStorageLog.setPostStoreNum(lod.getPostStoreNum());
|
||||
// bmStorageLogList.add(bmStorageLog);
|
||||
// }
|
||||
if (joinPoint.getArgs()[0] instanceof List &&
|
||||
((List) joinPoint.getArgs()[0]).stream().noneMatch((o -> !(o instanceof LeaseOutDetails)))) {
|
||||
List<LeaseOutDetails> leaseOutDetails = (List<LeaseOutDetails>)joinPoint.getArgs()[0];
|
||||
for (LeaseOutDetails lod : leaseOutDetails) {
|
||||
BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
bmStorageLog.setTaskId(String.valueOf(lod.getTaskId()));
|
||||
bmStorageLog.setTypeId(lod.getTypeId());
|
||||
bmStorageLog.setTypeName(lod.getMaCode());
|
||||
bmStorageLog.setPreStoreNum(lod.getNum());
|
||||
bmStorageLog.setOutNum(Objects.isNull(lod.getInputNum()) ? 0 : lod.getInputNum().intValue());
|
||||
bmStorageLog.setPostStoreNum(lod.getPostStoreNum());
|
||||
bmStorageLogList.add(bmStorageLog);
|
||||
}
|
||||
}
|
||||
if (joinPoint.getArgs()[0] instanceof LeaseOutDetails) {
|
||||
LeaseOutDetails lod = (LeaseOutDetails)joinPoint.getArgs()[0];
|
||||
BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
bmStorageLog.setTaskId(String.valueOf(lod.getTaskId()));
|
||||
bmStorageLog.setTypeId(lod.getTypeId());
|
||||
bmStorageLog.setTypeName(lod.getMaCode());
|
||||
bmStorageLog.setPreStoreNum(lod.getNum());
|
||||
bmStorageLog.setOutNum(Objects.isNull(lod.getInputNum()) ? 0 : lod.getInputNum().intValue());
|
||||
bmStorageLog.setPostStoreNum(lod.getPostStoreNum());
|
||||
bmStorageLogList.add(bmStorageLog);
|
||||
}
|
||||
// 退料接收-完成退料
|
||||
// if (joinPoint.getArgs()[0] instanceof BackApplyInfo) {
|
||||
// BackApplyInfo bai = (BackApplyInfo)joinPoint.getArgs()[0];
|
||||
// BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
// bmStorageLog.setTaskId(String.valueOf(bai.getTaskId()));
|
||||
// bmStorageLog.setTypeId(Integer.parseInt(bai.getTypeId()));
|
||||
// bmStorageLog.setTypeName(bai.getMaCode());
|
||||
// bmStorageLog.setPreStoreNum(Integer.parseInt(bai.getNum()));
|
||||
// bmStorageLog.setBackNum(bai.getBackNum());
|
||||
// bmStorageLog.setPassNum(bai.getPassNum());
|
||||
// bmStorageLog.setMaintenanceNum(bai.getMaintenanceNum());
|
||||
// bmStorageLog.setScrapNum(bai.getScrapNum());
|
||||
// bmStorageLog.setPostStoreNum(bai.getPostStoreNum());
|
||||
// bmStorageLogList.add(bmStorageLog);
|
||||
// }
|
||||
if (joinPoint.getArgs()[0] instanceof BackApplyInfo) {
|
||||
BackApplyInfo bai = (BackApplyInfo)joinPoint.getArgs()[0];
|
||||
BmStorageLog bmStorageLog = new BmStorageLog();
|
||||
bmStorageLog.setTaskId(String.valueOf(bai.getTaskId()));
|
||||
bmStorageLog.setTypeId(Integer.parseInt(bai.getTypeId()));
|
||||
bmStorageLog.setTypeName(bai.getMaCode());
|
||||
bmStorageLog.setPreStoreNum(Integer.parseInt(bai.getNum()));
|
||||
bmStorageLog.setBackNum(bai.getBackNum());
|
||||
bmStorageLog.setPassNum(bai.getPassNum());
|
||||
bmStorageLog.setMaintenanceNum(bai.getMaintenanceNum());
|
||||
bmStorageLog.setScrapNum(bai.getScrapNum());
|
||||
bmStorageLog.setPostStoreNum(bai.getPostStoreNum());
|
||||
bmStorageLogList.add(bmStorageLog);
|
||||
}
|
||||
// 二级库出入库, 不影响ma_type库存变化,暂时不加库存监控日志
|
||||
// if (joinPoint.getArgs()[0] instanceof TeamLeaseInfo) {
|
||||
// TeamLeaseInfo tli = (TeamLeaseInfo)joinPoint.getArgs()[0];
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.sgzb.app.controller;
|
||||
|
||||
import com.bonus.sgzb.app.domain.AppVersion;
|
||||
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.CriticalData;
|
||||
import com.bonus.sgzb.app.domain.ToDoList;
|
||||
import com.bonus.sgzb.app.service.AppService;
|
||||
|
|
|
|||
|
|
@ -1,15 +1,12 @@
|
|||
package com.bonus.sgzb.app.controller;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.BmAgreementInfo;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.app.service.BackApplyService;
|
||||
import com.bonus.sgzb.app.service.LeaseApplyDetailsService;
|
||||
import com.bonus.sgzb.app.service.LeaseApplyInfoService;
|
||||
import com.bonus.sgzb.app.service.TmTaskService;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.GlobalConstants;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
import com.bonus.sgzb.common.core.web.controller.BaseController;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.sgzb.app.controller;
|
||||
|
||||
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.app.service.*;
|
||||
import com.bonus.sgzb.common.core.text.Convert;
|
||||
|
|
|
|||
|
|
@ -1,201 +0,0 @@
|
|||
package com.bonus.sgzb.app.domain;
|
||||
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import io.swagger.models.auth.In;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 退料
|
||||
* @author bns_han
|
||||
*/
|
||||
@Data
|
||||
public class BackApplyInfo {
|
||||
/**
|
||||
* 退料id
|
||||
*/
|
||||
private Integer id;
|
||||
/**
|
||||
* 退料人
|
||||
*/
|
||||
private String userName;
|
||||
private String badId;
|
||||
private String[] typeIds;
|
||||
|
||||
@Excel(name = "退料状态",sort = 9)
|
||||
private String taskName;
|
||||
/**
|
||||
* 联系人
|
||||
*/
|
||||
@Excel(name = "联系电话",sort = 6)
|
||||
private String phone;
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@Excel(name = "退料工程",sort = 3)
|
||||
private String lotName;
|
||||
/**
|
||||
* 单位名称
|
||||
*/
|
||||
@Excel(name = "退料单位",sort = 2)
|
||||
private String unitName;
|
||||
/**
|
||||
* 开始时间
|
||||
*/
|
||||
private String planStartTime;
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String status;
|
||||
/**
|
||||
* 退料审核状态
|
||||
*/
|
||||
private String taskStatus;
|
||||
/**
|
||||
* 规格id
|
||||
*/
|
||||
private String typeId;
|
||||
private String modelId;
|
||||
|
||||
private List<MachinePart> maTypeDetails;
|
||||
/**
|
||||
* 类型名称
|
||||
*/
|
||||
@Excel(name = "退料机具",sort = 4)
|
||||
private String typeName;
|
||||
/**
|
||||
* 协议号
|
||||
*/
|
||||
@Excel(name = "协议号",sort = 8)
|
||||
private String agreementCode;
|
||||
/**
|
||||
* 规格编号
|
||||
*/
|
||||
private String typeCode;
|
||||
/**
|
||||
* 组织id
|
||||
*/
|
||||
private String companyId;
|
||||
/**
|
||||
* 在用数量
|
||||
*/
|
||||
private String num;
|
||||
/**
|
||||
* 编码
|
||||
*/
|
||||
private String maCode;
|
||||
/**
|
||||
* 协议id
|
||||
*/
|
||||
private String agreementId;
|
||||
/**
|
||||
* 人员
|
||||
*/
|
||||
private String createBy;
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String updateBy;
|
||||
private String updateTime;
|
||||
private String remark;
|
||||
/**
|
||||
* 审核备注
|
||||
*/
|
||||
private String directAuditRemark;
|
||||
@Excel(name = "退料单号",sort = 1)
|
||||
private String code;
|
||||
@Excel(name = "退料人员",sort = 5)
|
||||
private String backPerson;
|
||||
private String lotId;
|
||||
private String unitId;
|
||||
@Excel(name = "申请时间",sort = 7)
|
||||
private String backTime;
|
||||
private Integer maId;
|
||||
/**
|
||||
* 机具管理方式
|
||||
*/
|
||||
private String manageType;
|
||||
private String type;
|
||||
/**
|
||||
* 合格数量
|
||||
*/
|
||||
private Integer passNum;
|
||||
/**
|
||||
* 维修数量
|
||||
*/
|
||||
private Integer maintenanceNum;
|
||||
/**
|
||||
* 报废数量
|
||||
*/
|
||||
private Integer scrapNum;
|
||||
|
||||
/**
|
||||
* 退料数量
|
||||
*/
|
||||
private Integer backNum;
|
||||
|
||||
/**
|
||||
* 退料状态
|
||||
*/
|
||||
private String backStatus;
|
||||
|
||||
/**
|
||||
* 合格入库数量
|
||||
*/
|
||||
private String inputNum;
|
||||
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
private String keyWord;
|
||||
|
||||
/**
|
||||
* 任务类型
|
||||
*/
|
||||
private Integer taskType;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
private Integer taskId;
|
||||
|
||||
private BackApplyInfo info;
|
||||
|
||||
private BackApplyInfo[] arr;
|
||||
private List<BackApplyInfo> backApplyDetails;
|
||||
private Integer parentId;
|
||||
private String sdStatus;
|
||||
private String sdId;
|
||||
/**
|
||||
* 二维码编码
|
||||
*/
|
||||
private String qrCode;
|
||||
/**
|
||||
* rfid编码
|
||||
*/
|
||||
private String rfidCode;
|
||||
private String repairedNum;
|
||||
private String backId;
|
||||
private String repairer;
|
||||
/**
|
||||
* 退料数量
|
||||
*/
|
||||
private String preNum;
|
||||
private String startTime;
|
||||
private String endTime;
|
||||
private Integer flag;
|
||||
private Integer partNum;
|
||||
/**
|
||||
* 合格数量
|
||||
*/
|
||||
private Integer hgNum;
|
||||
/**
|
||||
* 维修数量
|
||||
*/
|
||||
private Integer wxNum;
|
||||
/**
|
||||
* 报废数量
|
||||
*/
|
||||
private Integer bfNum;
|
||||
}
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.app.domain;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.app.domain;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
package com.bonus.sgzb.app.mapper;
|
||||
|
||||
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.BmAgreementInfo;
|
||||
import com.bonus.sgzb.app.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.sgzb.app.mapper;
|
||||
|
||||
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
@ -77,6 +77,9 @@ public interface BackReceiveMapper {
|
|||
*/
|
||||
int updateMaStatus(@Param("maId") int maId,@Param("maStatus") String maStatus);
|
||||
|
||||
|
||||
int getmaChineByCt(BackApplyInfo record);
|
||||
|
||||
/**
|
||||
* getHgList
|
||||
* @param record
|
||||
|
|
|
|||
|
|
@ -1,9 +1,7 @@
|
|||
package com.bonus.sgzb.app.mapper;
|
||||
|
||||
import com.bonus.sgzb.app.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.app.domain.StorageStatus;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.base.domain.MaSupplierInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.sgzb.app.mapper;
|
||||
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||
import com.bonus.sgzb.app.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
package com.bonus.sgzb.app.mapper;
|
||||
|
||||
import com.bonus.sgzb.app.domain.*;
|
||||
import com.bonus.sgzb.base.domain.MaintenanceGang;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.sgzb.app.service;
|
||||
|
||||
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.BmAgreementInfo;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.sgzb.app.service;
|
||||
|
||||
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,22 +1,20 @@
|
|||
package com.bonus.sgzb.app.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.BmAgreementInfo;
|
||||
import com.bonus.sgzb.app.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.app.mapper.BackApplyAppMapper;
|
||||
import com.bonus.sgzb.app.service.BackApplyService;
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @author hay
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.sgzb.app.service.impl;
|
||||
|
||||
import com.bonus.sgzb.app.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.app.mapper.BackReceiveMapper;
|
||||
import com.bonus.sgzb.app.mapper.TmTaskMapper;
|
||||
|
|
@ -11,7 +11,6 @@ import com.bonus.sgzb.common.core.constant.TaskTypeConstants;
|
|||
import com.bonus.sgzb.common.core.enums.TaskStatusEnum;
|
||||
import com.bonus.sgzb.common.core.enums.TaskTypeEnum;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
@ -54,7 +53,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
typeIds.removeIf(item -> item == null);
|
||||
for (TmTask typeId : typeIds) {
|
||||
MachinePart machinePart = tmTaskMapper.getMachineParts(typeId);
|
||||
machinePart.setParentId(record.getId());
|
||||
machinePart.setParentId(record.getId().intValue());
|
||||
int countMachineByPidAndTid = tmTaskMapper.getCountMachineByPidAndTid(machinePart);
|
||||
Double machinePartNum = typeId.getPartNum() * Double.parseDouble(backApplyInfo.getPreNum());
|
||||
count1 += machinePartNum;
|
||||
|
|
@ -147,6 +146,17 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
int res;
|
||||
// try {
|
||||
int taskId = record.getTaskId();
|
||||
int passNum = 0;
|
||||
int maintenanceNum = 0;
|
||||
int scrapNum = 0;
|
||||
List<BackApplyInfo> allList1 = backReceiveMapper.getAllList(record);
|
||||
if (allList1 != null && allList1.size() > 0) {
|
||||
BackApplyInfo b = allList1.get(0);
|
||||
record.setTypeId(b.getTypeId());
|
||||
int num = backReceiveMapper.getmaChineByCt(record);
|
||||
record.setNum(String.valueOf(num));
|
||||
}
|
||||
|
||||
//先判断是否已经完成退料了
|
||||
int taskStatus = selectTaskStatus(taskId);
|
||||
if (taskStatus == 0) {
|
||||
|
|
@ -182,7 +192,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
if (res == 0) {
|
||||
throw new RuntimeException("ma_machines");
|
||||
}
|
||||
|
||||
for (BackApplyInfo bi : hgList) {
|
||||
passNum += bi.getBackNum();
|
||||
}
|
||||
}
|
||||
//维修的创建维修任务,插入任务协议表
|
||||
List<BackApplyInfo> wxList = backReceiveMapper.getWxList(record);
|
||||
|
|
@ -193,6 +205,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
res = insertTta(newTaskId, wxList);
|
||||
//插入维修记录表repair_apply_details
|
||||
res = insertRad(newTaskId, wxList);
|
||||
for (BackApplyInfo bi : wxList) {
|
||||
maintenanceNum += bi.getBackNum();
|
||||
}
|
||||
}
|
||||
//待报废的创建报废任务,插入任务协议表
|
||||
|
||||
|
|
@ -204,6 +219,9 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
res = insertTta(newTaskId, bfList);
|
||||
//插入维修记录表scrap_apply_details
|
||||
res = insertSad(newTaskId, bfList);
|
||||
for (BackApplyInfo bi : bfList) {
|
||||
scrapNum += bi.getBackNum();
|
||||
}
|
||||
}
|
||||
|
||||
List<BackApplyInfo> allList = backReceiveMapper.getAllList(record);
|
||||
|
|
@ -212,7 +230,18 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
if (res == 0) {
|
||||
throw new RuntimeException("该机具未被领料使用");
|
||||
}
|
||||
BackApplyInfo b = allList.get(0);
|
||||
record.setTypeId(b.getTypeId());
|
||||
int postStoreNum = backReceiveMapper.getmaChineByCt(record);
|
||||
record.setPostStoreNum(postStoreNum);
|
||||
}
|
||||
|
||||
//库存日志
|
||||
record.setBackNum(passNum+maintenanceNum+scrapNum);
|
||||
record.setPassNum(passNum);
|
||||
record.setMaintenanceNum(maintenanceNum);
|
||||
record.setScrapNum(scrapNum);
|
||||
|
||||
// } catch (Exception e) {
|
||||
// throw new RuntimeException(e.getMessage());
|
||||
// }
|
||||
|
|
@ -387,7 +416,7 @@ public class BackReceiveServiceImpl implements BackReceiveService {
|
|||
|
||||
private int insertTta(int taskId, List<BackApplyInfo> list) {
|
||||
int res;
|
||||
String agreementId = list.get(0).getAgreementId();
|
||||
String agreementId = String.valueOf(list.get(0).getAgreementId());
|
||||
res = backReceiveMapper.insertTta(taskId, agreementId);
|
||||
return res;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.sgzb.app.service.impl;
|
||||
|
||||
import com.bonus.sgzb.app.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.app.domain.StorageStatus;
|
||||
import com.bonus.sgzb.app.mapper.HoldingLedgerMapper;
|
||||
import com.bonus.sgzb.app.service.HoldingLedgerService;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.bonus.sgzb.app.service.impl;
|
|||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||
import com.bonus.sgzb.app.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.app.mapper.LeaseApplyDetailsMapper;
|
||||
import com.bonus.sgzb.app.mapper.LeaseOutDetailsMapper;
|
||||
|
|
@ -181,6 +181,7 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
if (res == 0) {
|
||||
throw new RuntimeException("出库失败,插入结算记录失败");
|
||||
}
|
||||
record.setPostStoreNum(getStorageNum(record));
|
||||
} else {
|
||||
return AjaxResult.error("领料出库失败,机具库存不足");
|
||||
}
|
||||
|
|
@ -194,6 +195,18 @@ public class LeaseOutDetailsServiceImpl implements LeaseOutDetailsService {
|
|||
return AjaxResult.success("出库成功");
|
||||
}
|
||||
|
||||
private int getStorageNum(LeaseOutDetails record) {
|
||||
if (StringUtils.isNull(record)) {
|
||||
return 0;
|
||||
}
|
||||
//判断(ma_type 设备规格表)中的库存够不够出库的
|
||||
MaType maType = leaseOutDetailsMapper.selectByTypeId(record);
|
||||
if (maType != null) {
|
||||
return maType.getNum().intValue();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private int insertRecords(LeaseOutDetails record) {
|
||||
int res = 0;
|
||||
// 首先更新领料任务详情表的领料数及状态(lease_apply_details)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ package com.bonus.sgzb.app.service.impl;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyDetails;
|
||||
import com.bonus.sgzb.app.domain.LeaseApplyInfo;
|
||||
import com.bonus.sgzb.app.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.app.domain.TmTask;
|
||||
import com.bonus.sgzb.app.mapper.LeaseApplyDetailsMapper;
|
||||
import com.bonus.sgzb.app.mapper.LeaseApplyInfoMapper;
|
||||
|
|
|
|||
|
|
@ -383,7 +383,7 @@
|
|||
bui.unit_id=#{unitId}
|
||||
and bui.del_flag='0'
|
||||
</select>
|
||||
<select id="getbackList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="getbackList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.id,
|
||||
bai.`code`,
|
||||
|
|
@ -417,7 +417,7 @@
|
|||
ORDER BY bai.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="materialList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="materialList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
mt.type_id,
|
||||
mt.type_name as typeCode,
|
||||
|
|
@ -441,7 +441,7 @@
|
|||
mt.type_id
|
||||
</select>
|
||||
|
||||
<select id="view" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="view" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
mt.type_name typeCode,
|
||||
CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName,
|
||||
|
|
@ -454,7 +454,7 @@
|
|||
WHERE
|
||||
bai.id=#{id}
|
||||
</select>
|
||||
<select id="examineList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="examineList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.id,
|
||||
bai.code,
|
||||
|
|
@ -487,7 +487,7 @@
|
|||
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
|
||||
</select>
|
||||
<select id="examineView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="examineView" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
mt.type_name typeCode,
|
||||
CONCAT_WS('/', IFNULL(mt2.type_name, '')) AS typeName,
|
||||
|
|
@ -504,7 +504,7 @@
|
|||
WHERE
|
||||
bai.id=#{id}
|
||||
</select>
|
||||
<select id="selectBackApplyInfo" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="selectBackApplyInfo" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT * FROM tm_task tt
|
||||
LEFT JOIN back_apply_info bai ON bai.task_id = tt.task_id
|
||||
LEFT JOIN back_apply_details bad on bad.parent_id=bai.id
|
||||
|
|
@ -527,7 +527,7 @@
|
|||
WHERE
|
||||
mt1.type_id = #{typeId}
|
||||
</select>
|
||||
<select id="getMachineParts" resultType="com.bonus.sgzb.app.domain.MachinePart">
|
||||
<select id="getMachineParts" resultType="com.bonus.sgzb.base.api.domain.MachinePart">
|
||||
SELECT
|
||||
mt.type_name AS typeModelName,
|
||||
mt.unit_name as unitName,
|
||||
|
|
|
|||
|
|
@ -585,7 +585,7 @@
|
|||
</if>
|
||||
</delete>
|
||||
|
||||
<select id="getbackReceiveList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="getbackReceiveList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.id,
|
||||
bai.`code`,
|
||||
|
|
@ -654,7 +654,7 @@
|
|||
bai.create_time DESC
|
||||
</select>
|
||||
|
||||
<select id="receiveView" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="receiveView" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.id,
|
||||
bai.task_id as taskId,
|
||||
|
|
@ -695,10 +695,15 @@
|
|||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getmaChineByCt" resultType="java.lang.Integer">
|
||||
select num from ma_type WHERE type_id = #{typeId}
|
||||
</select>
|
||||
|
||||
<select id="selectTaskNumByMonthWx" resultType="java.lang.Integer">
|
||||
select count(*) from tm_task where DATE_FORMAT(create_time,'%y%m') = DATE_FORMAT(#{date},'%y%m') and task_type = #{taskType}
|
||||
</select>
|
||||
<select id="getHgList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
|
||||
<select id="getHgList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
tta.agreement_id as agreementId,
|
||||
bai.id,
|
||||
|
|
@ -718,7 +723,7 @@
|
|||
and bcd.back_status='1'
|
||||
</select>
|
||||
|
||||
<select id="getWxList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="getWxList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
tta.agreement_id as agreementId,
|
||||
bai.id,
|
||||
|
|
@ -738,7 +743,7 @@
|
|||
and bcd.back_status='2'
|
||||
</select>
|
||||
|
||||
<select id="getBfList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="getBfList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
tta.agreement_id as agreementId,
|
||||
bai.id,
|
||||
|
|
@ -758,7 +763,7 @@
|
|||
and bcd.back_status='3'
|
||||
</select>
|
||||
|
||||
<select id="codeQuery" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="codeQuery" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
mt.type_id as typeId,
|
||||
mm.ma_id as maId,
|
||||
|
|
@ -776,7 +781,7 @@
|
|||
and sd.id='16'
|
||||
</select>
|
||||
|
||||
<select id="qrcodeQuery" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="qrcodeQuery" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
mt.type_id as typeId,
|
||||
mm.ma_id as maId,
|
||||
|
|
@ -794,7 +799,7 @@
|
|||
WHERE
|
||||
mm.qr_code =#{qrCode} and sai.agreement_id = #{agreementId}
|
||||
</select>
|
||||
<select id="backReceiveRecord" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="backReceiveRecord" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeCode,
|
||||
|
|
@ -827,7 +832,7 @@
|
|||
AND bai.task_id = #{taskId}
|
||||
</select>
|
||||
|
||||
<select id="rfidCodeQuery" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="rfidCodeQuery" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
mt.type_id as typeId,
|
||||
mm.ma_id as maId,
|
||||
|
|
@ -870,7 +875,7 @@
|
|||
</if>
|
||||
order by start_time asc
|
||||
</select>
|
||||
<select id="getAllList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="getAllList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
tta.agreement_id AS agreementId,
|
||||
bai.id,
|
||||
|
|
@ -960,7 +965,7 @@
|
|||
) res
|
||||
HAVING backNum > -1
|
||||
</select>
|
||||
<select id="backReceiveRecordWeb" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="backReceiveRecordWeb" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeCode,
|
||||
|
|
@ -988,7 +993,7 @@
|
|||
ORDER BY
|
||||
bcd.create_time DESC
|
||||
</select>
|
||||
<select id="getCtList" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="getCtList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bad.type_id as typeId,
|
||||
ifnull(bad.audit_num,0) as backNum,
|
||||
|
|
@ -999,7 +1004,7 @@
|
|||
WHERE
|
||||
bad.parent_id = #{parentId}
|
||||
</select>
|
||||
<select id="backReceiveRecordWebPt" resultType="com.bonus.sgzb.app.domain.BackApplyInfo">
|
||||
<select id="backReceiveRecordWebPt" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
mt2.type_name AS typeName,
|
||||
mt1.type_name AS typeCode,
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@
|
|||
WHERE
|
||||
mt1.type_id = #{typeId}
|
||||
</select>
|
||||
<select id="getMachineParts" resultType="com.bonus.sgzb.app.domain.MachinePart">
|
||||
<select id="getMachineParts" resultType="com.bonus.sgzb.base.api.domain.MachinePart">
|
||||
SELECT
|
||||
mt.type_name AS typeModelName,
|
||||
mt.unit_name as unitName,
|
||||
|
|
|
|||
|
|
@ -1081,7 +1081,7 @@
|
|||
WHERE
|
||||
mt1.type_id = #{typeId}
|
||||
</select>
|
||||
<select id="getMachineParts" resultType="com.bonus.sgzb.app.domain.MachinePart">
|
||||
<select id="getMachineParts" resultType="com.bonus.sgzb.base.api.domain.MachinePart">
|
||||
SELECT
|
||||
mt.type_name AS typeModelName,
|
||||
mt.type_id as modelId,
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and mt.type_id = #{typeId}
|
||||
</if>
|
||||
</select>
|
||||
<select id="getWholeSetDetails" resultType="com.bonus.sgzb.app.domain.MachinePart">
|
||||
<select id="getWholeSetDetails" resultType="com.bonus.sgzb.base.api.domain.MachinePart">
|
||||
SELECT
|
||||
mt2.type_name AS typeModelName,
|
||||
mt2.type_id AS typeId,
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import com.bonus.sgzb.common.log.annotation.Log;
|
|||
import com.bonus.sgzb.common.log.enums.BusinessType;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.BackApplyDto;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.service.BackApplyService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
|
|||
|
|
@ -5,10 +5,7 @@ import com.bonus.sgzb.common.core.web.controller.BaseController;
|
|||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
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.LeaseRecord;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
import com.bonus.sgzb.material.service.BackApplyService;
|
||||
import com.bonus.sgzb.material.service.LeaseRecordService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
package com.bonus.sgzb.material.controller;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.MachinePart;
|
||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||
import com.bonus.sgzb.material.service.IPurchaseCheckInfoService;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ 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;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ 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;
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.material.domain;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.sgzb.material.domain;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.DirectApplyDetails;
|
||||
import com.bonus.sgzb.base.api.domain.DirectApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||
import com.bonus.sgzb.common.core.web.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
|
|
|||
|
|
@ -1,16 +0,0 @@
|
|||
package com.bonus.sgzb.material.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author:梁超
|
||||
* @date:2024/4/17 - 9:04
|
||||
*/
|
||||
@Data
|
||||
public class MachinePart {
|
||||
private String typeModelName;
|
||||
private String unitName;
|
||||
private String typeName;
|
||||
private Integer partNum;
|
||||
private Integer typeId;
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
import com.bonus.sgzb.material.domain.BackApplyDto;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.TypeTreeNode;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.BackRecord;
|
||||
import com.bonus.sgzb.material.domain.LeaseRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
|
|
|
|||
|
|
@ -3,13 +3,10 @@ package com.bonus.sgzb.material.mapper;
|
|||
import com.bonus.sgzb.base.api.domain.LeaseOutDetails;
|
||||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.LeaseRecord;
|
||||
import com.bonus.sgzb.material.domain.TypeTreeNode;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||
import com.bonus.sgzb.material.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@ import com.bonus.sgzb.base.api.domain.MaMachineLabel;
|
|||
import com.bonus.sgzb.base.api.domain.MaType;
|
||||
import com.bonus.sgzb.material.domain.InputApplyDetails;
|
||||
import com.bonus.sgzb.base.api.domain.MaInputRecord;
|
||||
import com.bonus.sgzb.material.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.material.domain.PurchaseMacodeInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
|
|
|||
|
|
@ -1,11 +1,7 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.SltAgreementInfo;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.BackRecord;
|
||||
import com.bonus.sgzb.material.domain.RepairRecord;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.RepairAuditDetails;
|
||||
import com.bonus.sgzb.material.domain.RepairRecord;
|
||||
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
package com.bonus.sgzb.material.mapper;
|
||||
|
||||
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.ScrapApplyDetails;
|
||||
import com.bonus.sgzb.material.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.material.domain.TmTask;
|
||||
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ package com.bonus.sgzb.material.service;
|
|||
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.material.domain.BackApplyDto;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
package com.bonus.sgzb.material.service;
|
||||
|
||||
import com.bonus.sgzb.material.domain.BmNoticeInfo;
|
||||
import com.bonus.sgzb.material.domain.MachinePart;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.material.domain.PurchaseCheckInfo;
|
||||
import com.bonus.sgzb.material.domain.PurchaseInput;
|
||||
import com.bonus.sgzb.material.vo.NoticeInfoVO;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package com.bonus.sgzb.material.service;
|
||||
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.LeaseRecord;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
package com.bonus.sgzb.material.service;
|
||||
|
||||
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.TmTask;
|
||||
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
package com.bonus.sgzb.material.service;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.*;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.DirectPassApplyInfoDetails;
|
||||
import com.bonus.sgzb.material.domain.TmTask;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.bonus.sgzb.material.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
|
|
@ -150,7 +152,7 @@ public class BackApplyServiceImpl implements BackApplyService {
|
|||
typeIds.removeIf(item -> item == null);
|
||||
for (TmTask typeId : typeIds) {
|
||||
MachinePart machinePart = tmTaskMapper.getMachineParts(typeId);
|
||||
machinePart.setPartNum((int) (Double.parseDouble(typeId.getPartNum()) * Double.parseDouble(backApplyInfo.getPreNum())));
|
||||
machinePart.setPartNum((Double.parseDouble(typeId.getPartNum()) * Double.parseDouble(backApplyInfo.getPreNum())));
|
||||
machineParts.add(machinePart);
|
||||
}
|
||||
backApplyInfo.setMaTypeDetails(machineParts);
|
||||
|
|
|
|||
|
|
@ -1,29 +1,12 @@
|
|||
package com.bonus.sgzb.material.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.LeaseRecord;
|
||||
import com.bonus.sgzb.material.domain.TypeTreeNode;
|
||||
import com.bonus.sgzb.material.mapper.BackApplyMapper;
|
||||
import com.bonus.sgzb.material.mapper.LeaseRecordMapper;
|
||||
import com.bonus.sgzb.material.mapper.TaskMapper;
|
||||
import com.bonus.sgzb.material.service.BackApplyService;
|
||||
import com.bonus.sgzb.material.service.LeaseRecordService;
|
||||
import com.bonus.sgzb.material.vo.GlobalContants;
|
||||
import com.bonus.sgzb.material.vo.TypeTreeBuild;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author hay
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package com.bonus.sgzb.material.service.impl;
|
||||
|
||||
import com.bonus.sgzb.base.api.domain.MachinePart;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import java.util.List;
|
|||
import java.util.stream.Collectors;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.common.core.constant.TaskTypeConstants;
|
||||
import com.bonus.sgzb.common.core.enums.ReviewStatusEnum;
|
||||
import com.bonus.sgzb.common.core.enums.ScrapSourceEnum;
|
||||
|
|
@ -22,13 +23,10 @@ import com.bonus.sgzb.material.exception.ExceptionDict;
|
|||
import com.bonus.sgzb.material.mapper.*;
|
||||
import com.bonus.sgzb.material.service.IScrapApplyDetailsService;
|
||||
import com.bonus.sgzb.material.vo.ForecastWasteExcel;
|
||||
import com.bonus.sgzb.material.vo.GlobalContants;
|
||||
import com.bonus.sgzb.material.vo.ScrapApplyDetailsVO;
|
||||
import com.bonus.sgzb.material.vo.ScrapAudit;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.catalina.security.SecurityUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
|
|
|
|||
|
|
@ -6,9 +6,8 @@ import java.util.List;
|
|||
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringHelper;
|
||||
import com.bonus.sgzb.material.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.base.api.domain.BackApplyInfo;
|
||||
import com.bonus.sgzb.material.domain.TmTask;
|
||||
import com.bonus.sgzb.material.vo.GlobalContants;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.bonus.sgzb.material.mapper.TaskMapper;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@ package com.bonus.sgzb.material.service.impl;
|
|||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.bonus.sgzb.base.api.domain.*;
|
||||
import com.bonus.sgzb.common.core.utils.DateUtils;
|
||||
import com.bonus.sgzb.common.core.utils.StringUtils;
|
||||
import com.bonus.sgzb.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.sgzb.common.security.utils.SecurityUtils;
|
||||
import com.bonus.sgzb.material.domain.*;
|
||||
import com.bonus.sgzb.material.mapper.BackRecordMapper;
|
||||
|
|
@ -13,13 +11,11 @@ import com.bonus.sgzb.material.mapper.LeaseRecordMapper;
|
|||
import com.bonus.sgzb.material.mapper.WorkSiteDirectManageMapper;
|
||||
import com.bonus.sgzb.material.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<result property="fileName" column="file_name"/>
|
||||
<result property="fileUrl" column="file_url"/>
|
||||
</resultMap>
|
||||
<insert id="insertTask" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.material.domain.BackApplyInfo" useGeneratedKeys="true">
|
||||
<insert id="insertTask" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.base.api.domain.BackApplyInfo" useGeneratedKeys="true">
|
||||
insert into tm_task (
|
||||
<if test="taskType != null">task_type, </if>
|
||||
<if test="taskStatus != null">task_status, </if>
|
||||
|
|
@ -100,7 +100,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
<insert id="insertBackApply" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.material.domain.BackApplyInfo" useGeneratedKeys="true">
|
||||
<insert id="insertBackApply" keyColumn="id" keyProperty="id" parameterType="com.bonus.sgzb.base.api.domain.BackApplyInfo" useGeneratedKeys="true">
|
||||
insert into back_apply_info
|
||||
(
|
||||
<if test="code != null">
|
||||
|
|
@ -403,7 +403,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
|
||||
</delete>
|
||||
|
||||
<select id="getBackApplyList" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="getBackApplyList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.id,
|
||||
bai.`code`,
|
||||
|
|
@ -461,7 +461,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ORDER BY bai.create_time desc
|
||||
</select>
|
||||
|
||||
<select id="getMaterialList" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="getMaterialList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT subquery1.type_id as typeId,
|
||||
subquery1.typeName typeCode,
|
||||
subquery1.typeNames as typeName,
|
||||
|
|
@ -528,7 +528,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ORDER BY create_time DESC LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getView" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="getView" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.back_person AS backPerson,
|
||||
bai.phone AS phone,
|
||||
|
|
@ -610,7 +610,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LEVEL ASC;
|
||||
</select>
|
||||
|
||||
<select id="exportList" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="exportList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.`code`,
|
||||
bai.back_person as backPerson,
|
||||
|
|
@ -658,7 +658,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
ORDER BY bai.task_id desc
|
||||
</select>
|
||||
<select id="getBackApplyListByAdmin" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="getBackApplyListByAdmin" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.id,
|
||||
bai.`code`,
|
||||
|
|
@ -732,7 +732,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
(SELECT * FROM back_apply_info bai2 WHERE bai2.id = #{id}) dd
|
||||
on bai1.task_id = dd.task_id
|
||||
</select>
|
||||
<select id="getViewByApply" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="getViewByApply" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.back_person AS backPerson,
|
||||
bai.phone AS phone,
|
||||
|
|
@ -788,7 +788,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
mt.type_name like concat('%', #{keyWord}, '%'))
|
||||
</if>
|
||||
</select>
|
||||
<select id="getBackApplyListByAdmin1" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="getBackApplyListByAdmin1" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
bai.id,
|
||||
bai.`code`,
|
||||
|
|
@ -851,7 +851,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</if>
|
||||
ORDER BY bai.create_time desc
|
||||
</select>
|
||||
<select id="selectIdByTaskId" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="selectIdByTaskId" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
select * from back_apply_info where task_id = #{taskId}
|
||||
</select>
|
||||
<select id="getUseNumByTypeId" resultType="java.lang.Integer">
|
||||
|
|
|
|||
|
|
@ -140,7 +140,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
and bai.agreement_code like concat('%',#{agreementCode},'%')
|
||||
</if>
|
||||
</select>
|
||||
<select id="getAllList" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="getAllList" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
SELECT
|
||||
tta.agreement_id AS agreementId,
|
||||
bai.id,
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
) t
|
||||
GROUP BY task_id
|
||||
</select>
|
||||
<select id="getWholeSetDetails" resultType="com.bonus.sgzb.material.domain.MachinePart">
|
||||
<select id="getWholeSetDetails" resultType="com.bonus.sgzb.base.api.domain.MachinePart">
|
||||
SELECT
|
||||
mt2.type_name AS typeModelName,
|
||||
mt2.type_id as typeId,
|
||||
|
|
|
|||
|
|
@ -331,7 +331,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where task_id = #{taskId} and status = '0'
|
||||
</select>
|
||||
|
||||
<select id="getBackApplyInfo" resultType="com.bonus.sgzb.material.domain.BackApplyInfo">
|
||||
<select id="getBackApplyInfo" resultType="com.bonus.sgzb.base.api.domain.BackApplyInfo">
|
||||
select id,
|
||||
code,
|
||||
task_id as taskId,
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
INSERT INTO tm_task_agreement ( `task_id`, `agreement_id`, `create_by`, `create_time`, `company_id` )
|
||||
VALUES(#{id},#{agreementId},#{createBy},NOW(),#{companyId})
|
||||
</insert>
|
||||
<insert id="insertTmTaskByBackInfo" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.material.domain.BackApplyInfo" useGeneratedKeys="true">
|
||||
<insert id="insertTmTaskByBackInfo" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.base.api.domain.BackApplyInfo" useGeneratedKeys="true">
|
||||
insert into tm_task (
|
||||
<if test="taskType != null">task_type, </if>
|
||||
<if test="taskStatus != null">task_status, </if>
|
||||
|
|
@ -236,7 +236,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
WHERE
|
||||
mt1.type_id = #{typeId}
|
||||
</select>
|
||||
<select id="getMachineParts" resultType="com.bonus.sgzb.material.domain.MachinePart">
|
||||
<select id="getMachineParts" resultType="com.bonus.sgzb.base.api.domain.MachinePart">
|
||||
SELECT
|
||||
mt.type_name AS typeModelName,
|
||||
mt.unit_name as unitName,
|
||||
|
|
|
|||
|
|
@ -299,7 +299,7 @@
|
|||
NOW()
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="insertBackApplyInfo" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.material.domain.BackApplyInfo" useGeneratedKeys="true">
|
||||
<insert id="insertBackApplyInfo" keyColumn="task_id" keyProperty="taskId" parameterType="com.bonus.sgzb.base.api.domain.BackApplyInfo" useGeneratedKeys="true">
|
||||
insert into tm_task (
|
||||
<if test="taskType != null">task_type, </if>
|
||||
<if test="taskStatus != null">task_status, </if>
|
||||
|
|
|
|||
|
|
@ -1,169 +0,0 @@
|
|||
<template>
|
||||
<!-- 库存日志 -->
|
||||
<div class="app-container">
|
||||
<el-row>
|
||||
<el-form :model="queryParams" ref="queryForm" size="small" :inline="true">
|
||||
<el-form-item label="模块名称" prop="modelTitle">
|
||||
<el-input
|
||||
v-model="queryParams.modelTitle"
|
||||
placeholder="请输入模块名称"
|
||||
clearable
|
||||
style="width: 200px"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="机具类型" prop="typeName">
|
||||
<el-cascader
|
||||
placeholder="请选择机具类型"
|
||||
:options="deviceTypeTree"
|
||||
:props="{ checkStrictly: true, value: 'label' }"
|
||||
@change="handleBaseValue"
|
||||
clearable
|
||||
filterable
|
||||
:show-all-levels="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-table :data="tableList" border>
|
||||
<el-table-column align="center" label="序号" type="index" width="60" />
|
||||
<el-table-column align="center" prop="modelTitle" label="模块名称" show-overflow-tooltip />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="method" label="请求方式" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="requestMethod" label="请求地址" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="task" label="实例" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="typeParentName" label="机具类型" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="typeName" label="机具规格" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="description" label="描述" />
|
||||
<el-table-column show-overflow-tooltip align="center" prop="time" label="日期" />
|
||||
<el-table-column align="center" label="状态">
|
||||
<template slot-scope="{ row }">
|
||||
<el-tag size="mini" type="success" v-if="row.status == 0">正常</el-tag>
|
||||
<el-tag size="mini" type="warning" v-else>异常</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column align="center" prop="creator" label="创建人" />
|
||||
<el-table-column align="center" prop="remark" label="备注" />
|
||||
<el-table-column align="center" label="操作">
|
||||
<template slot-scope="{ row }">
|
||||
<el-button size="mini" type="text" @click="previewLogsDetails(row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 详情弹框 -->
|
||||
<el-dialog title="日志详情" :visible.sync="logsDetailsDialogVisible" width="60%">
|
||||
<el-descriptions
|
||||
class="margin-top"
|
||||
:column="3"
|
||||
size="medium"
|
||||
border
|
||||
:labelStyle="commonStyle"
|
||||
:contentStyle="commonStyle"
|
||||
>
|
||||
<el-descriptions-item v-for="(item, v) in detailsLabelList" :key="v">
|
||||
<template slot="label">{{ item.label }}</template>
|
||||
{{ logsDetailsInfo[item.content] || '' }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getLogsListApi, getLogsDetailsApi } from '@/api/inventoryLogs'
|
||||
import { getDeviceTypeTree } from '@/api/claimAndRefund/receive'
|
||||
export default {
|
||||
name: 'myInventoryLogs',
|
||||
data() {
|
||||
return {
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
modelTitle: '', // 模块名称
|
||||
typeName: '', // 机具名称
|
||||
},
|
||||
tableList: [],
|
||||
total: 5,
|
||||
logsDetailsInfo: null /* 日志详情 */,
|
||||
logsDetailsDialogVisible: false,
|
||||
commonStyle: {
|
||||
'text-align': 'center',
|
||||
},
|
||||
/* 日志详情label以及内容 */
|
||||
detailsLabelList: [
|
||||
{ label: '创建人', content: 'creator' },
|
||||
{ label: '请求方式', content: 'method' },
|
||||
{ label: '模块名称', content: 'modelTitle' },
|
||||
{ label: '请求地址', content: 'requestMethod' },
|
||||
{ label: '机具名称', content: 'typeParentName' },
|
||||
{ label: '机具规格', content: 'typeName' },
|
||||
{ label: '日期', content: 'time' },
|
||||
{ label: '实例', content: 'task' },
|
||||
],
|
||||
logsDetailsInfo: {},
|
||||
deviceTypeTree: [], // 设备 树结构数据
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/* 查询列表 */
|
||||
async getList() {
|
||||
const res = await getLogsListApi(this.queryParams)
|
||||
this.tableList = res.rows
|
||||
this.total = res.total
|
||||
},
|
||||
/* 搜索按钮 */
|
||||
handleQuery() {
|
||||
this.getList()
|
||||
},
|
||||
/* 重置按钮 */
|
||||
resetQuery() {
|
||||
this.resetForm('queryForm')
|
||||
this.queryParams.pageNum = 1
|
||||
this.queryParams.pageSize = 10
|
||||
this.queryParams.typeName = ''
|
||||
this.getList()
|
||||
},
|
||||
/* 查看详情 */
|
||||
async previewLogsDetails(row) {
|
||||
console.log(row, '列表id')
|
||||
const res = await getLogsDetailsApi(row.id)
|
||||
this.logsDetailsInfo = res
|
||||
this.logsDetailsDialogVisible = true
|
||||
},
|
||||
async GetDeviceTypeTree() {
|
||||
const params = {
|
||||
level: 4,
|
||||
}
|
||||
const res = await getDeviceTypeTree(params)
|
||||
this.deviceTypeTree = res.data
|
||||
},
|
||||
/* 获取最后一级 */
|
||||
handleBaseValue(val) {
|
||||
this.queryParams.typeName = val[val.length - 1]
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
this.GetDeviceTypeTree()
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.margin-top {
|
||||
margin-top: -15px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue