Merge branch 'master' of http://192.168.0.75:3000/bonus/Bonus-Cloud-Material
This commit is contained in:
commit
180bdd36a2
|
|
@ -0,0 +1,291 @@
|
|||
package com.bonus.common.biz.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 领料任务对象 lease_apply_info
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Data
|
||||
@ToString
|
||||
public class LeaseRecordInfo extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "登录用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "申请时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "申请时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@Excel(name = "申请人")
|
||||
@ApiModelProperty(value = "申请人")
|
||||
private String createBy;
|
||||
|
||||
@ApiModelProperty(value = "实施单位")
|
||||
private String impUnitName;
|
||||
|
||||
@ApiModelProperty(value = "合同主体")
|
||||
private String contractPart;
|
||||
|
||||
@ApiModelProperty(value = "领料单位")
|
||||
@Excel(name = "领用单位")
|
||||
private String leaseUnit;
|
||||
|
||||
@ApiModelProperty(value = "发料单位")
|
||||
private String sendUnit;
|
||||
|
||||
@ApiModelProperty(value = "领料id")
|
||||
private Integer leaseUnitId;
|
||||
|
||||
@ApiModelProperty(value = "租赁工程")
|
||||
@Excel(name = "领用工程")
|
||||
private String leaseProject;
|
||||
|
||||
@ApiModelProperty(value = "领料工程id")
|
||||
private Integer leaseProjectId;
|
||||
|
||||
@ApiModelProperty(value = "领料人签名URL")
|
||||
private String leaseSignUrl;
|
||||
|
||||
@ApiModelProperty(value = "领料人签名类型")
|
||||
private Byte leaseSignType;
|
||||
|
||||
/**
|
||||
* 领料物资名称汇总
|
||||
*/
|
||||
@ApiModelProperty(value = "领料物资名称汇总")
|
||||
@Excel(name = "领料物资类型")
|
||||
private String maTypeNames;
|
||||
|
||||
@ApiModelProperty(value = "协议号")
|
||||
@Excel(name = "协议号")
|
||||
private String agreementCode;
|
||||
|
||||
/** 任务编号: 领料单号 */
|
||||
@ApiModelProperty(value = "领料单号")
|
||||
@Excel(name = "业务单号")
|
||||
private String code;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
||||
/** 领料人 */
|
||||
@Excel(name = "领料人")
|
||||
@ApiModelProperty(value = "领料人")
|
||||
private String leasePerson;
|
||||
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
@Excel(name = "领料电话")
|
||||
private String phone;
|
||||
|
||||
/** 1:1级审批,2:2级审批 */
|
||||
@ApiModelProperty(value = "1:1级审批,2:2级审批")
|
||||
private String type;
|
||||
|
||||
/** 公司审批人 */
|
||||
@ApiModelProperty(value = "公司审批人")
|
||||
private Long companyAuditBy;
|
||||
|
||||
/** 公司审批时间 */
|
||||
@ApiModelProperty(value = "公司审批时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date companyAuditTime;
|
||||
|
||||
/** 公司审批备注 */
|
||||
@ApiModelProperty(value = "公司审批备注")
|
||||
private String companyAuditRemark;
|
||||
|
||||
/** 分管审批人 */
|
||||
@ApiModelProperty(value = "分管审批人")
|
||||
private Long deptAuditBy;
|
||||
|
||||
/** 分管审批时间 */
|
||||
@ApiModelProperty(value = "分管审批时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date deptAuditTime;
|
||||
|
||||
/** 分管审批备注 */
|
||||
@ApiModelProperty(value = "分管审批备注")
|
||||
private String deptAuditRemark;
|
||||
|
||||
/** 机具分公司审批 */
|
||||
@ApiModelProperty(value = "机具分公司审批")
|
||||
private Long directAuditBy;
|
||||
|
||||
/** 机具分公司审批时间 */
|
||||
@ApiModelProperty(value = "机具分公司审批时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date directAuditTime;
|
||||
|
||||
/** 机具分公司审批备注 */
|
||||
@ApiModelProperty(value = "机具分公司审批备注")
|
||||
private String directAuditRemark;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
/** 1机具分公司审核通过,2调试分公司审核通过3机具分公司审核驳回4调试分公司审核驳回5出库进行中5出库完成 */
|
||||
// @Excel(name = "1机具分公司审核通过,2调试分公司审核通过3机具分公司审核驳回4调试分公司审核驳回5出库进行中5出库完成")
|
||||
// @ApiModelProperty(value = "1机具分公司审核通过,2调试分公司审核通过3机具分公司审核驳回4调试分公司审核驳回5出库进行中5出库完成")
|
||||
// private String status;
|
||||
|
||||
/** $column.columnComment */
|
||||
private Long directId;
|
||||
|
||||
/** 0工程1长期 */
|
||||
@ApiModelProperty(value = "0工程1长期")
|
||||
private String leaseType;
|
||||
|
||||
/** 预领料时间 */
|
||||
@ApiModelProperty(value = "预领料时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date estimateLeaseTime;
|
||||
|
||||
/** 费用承担方(01项目03分包) */
|
||||
@ApiModelProperty(value = "费用承担方(01项目03分包)")
|
||||
private String costBearingParty;
|
||||
|
||||
@ApiModelProperty(value = "协议id")
|
||||
private Long agreementId;
|
||||
|
||||
/** 任务类型(定义数据字典) */
|
||||
@ApiModelProperty(value = "任务类型(定义数据字典)")
|
||||
private Integer taskType;
|
||||
|
||||
/** 任务状态(定义数据字典) */
|
||||
@ApiModelProperty(value = "任务状态(定义数据字典)")
|
||||
private Integer taskStatus;
|
||||
|
||||
@Excel(name = "状态")
|
||||
@ApiModelProperty(value = "任务状态(定义数据字典)")
|
||||
private String taskStatusName;
|
||||
|
||||
@ApiModelProperty(value = "任务当月序号 例如:1 插入及查询时请携带任务类型")
|
||||
private Integer monthOrder;
|
||||
|
||||
@ApiModelProperty(value = "领料人手机号")
|
||||
private String leasePhone;
|
||||
|
||||
@ApiModelProperty(value = "往来单位id")
|
||||
private Long unitId;
|
||||
|
||||
@ApiModelProperty(value = "往来单位")
|
||||
private String unitName;
|
||||
|
||||
@ApiModelProperty(value = "工程id")
|
||||
private Long projectId;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String projectName;
|
||||
|
||||
/**
|
||||
* 预领料合计数
|
||||
*/
|
||||
@ApiModelProperty(value = "预领料合计数")
|
||||
private BigDecimal preCountNum;
|
||||
|
||||
@ApiModelProperty(value = "已出库数量")
|
||||
private BigDecimal alNum;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
@ApiModelProperty(value = "任务状态列表")
|
||||
private List<Integer> statusList;
|
||||
|
||||
@ApiModelProperty(value = "审批人人签名URL")
|
||||
private String directAuditSignUrl;
|
||||
|
||||
/**
|
||||
* 分包商单位委托书
|
||||
*/
|
||||
@ApiModelProperty(value = "分包商单位委托书")
|
||||
List<BmFileInfo> bmFileInfos;
|
||||
|
||||
|
||||
/**
|
||||
* 标准配置id
|
||||
*/
|
||||
@ApiModelProperty(value = "标准配置id")
|
||||
private Long configId;
|
||||
|
||||
/**
|
||||
* 是否为领用申请
|
||||
*/
|
||||
@ApiModelProperty(value = "是否为领用申请")
|
||||
private Integer isLease;
|
||||
|
||||
@ApiModelProperty(value = "采购申请编号")
|
||||
private String applyCode;
|
||||
|
||||
private Integer isApp;
|
||||
|
||||
@ApiModelProperty(value = "供应时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
private Date supplierTime;
|
||||
|
||||
@ApiModelProperty(value = "供应地点")
|
||||
private String supplierPlace;
|
||||
|
||||
@ApiModelProperty(value = "公司名称")
|
||||
private String companyName;
|
||||
|
||||
@ApiModelProperty(value = "本流程节点id")
|
||||
private Integer nodeId;
|
||||
|
||||
@ApiModelProperty(value = "下个流程节点id")
|
||||
private Integer nextNodeId;
|
||||
|
||||
@ApiModelProperty(value = "流程配置值")
|
||||
private String configValue;
|
||||
|
||||
@ApiModelProperty(value = "所属记录")
|
||||
private Integer recordId;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "设备id")
|
||||
private Long maId;
|
||||
|
||||
@ApiModelProperty(value = "流程节点签名方式 0:或签 1:会签")
|
||||
private Integer nodeSignType;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "发布批次")
|
||||
private String publishTask;
|
||||
}
|
||||
|
|
@ -13,9 +13,10 @@ public enum LeaseTaskStatusEnum {
|
|||
LEASE_TASK_ZERO(0, "待审核"),
|
||||
LEASE_TASK_SUBMIT(5, "待提交"),
|
||||
LEASE_TASK_TO_PUBLISHED(1, "待发布"),
|
||||
LEASE_TASK_TO_AUDIT(2, "已终结"),
|
||||
LEASE_TASK_TO_AUDIT(2, "已终止"),
|
||||
LEASE_TASK_IN_PROGRESS(3, "出库进行中"),
|
||||
LEASE_TASK_FINISHED(4, "出库已完成");
|
||||
LEASE_TASK_FINISHED(4, "出库已完成"),
|
||||
LEASE_AUDIT_ING(6, "审核中");
|
||||
private final Integer status;
|
||||
private final String statusName;
|
||||
|
||||
|
|
|
|||
|
|
@ -222,6 +222,58 @@ public class ComplexQueryController extends BaseController {
|
|||
util.exportExcel(response, list, "综合查询--导出修饰待入库详情");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--查询待报废设备详情")
|
||||
@GetMapping("/getScrapList")
|
||||
public AjaxResult getScrapList(ScrapRecordInfo bean) {
|
||||
startPage();
|
||||
List<ScrapRecordInfo> list = complexQueryService.getScrapList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出待报废设备详情
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--导出待报废设备详情")
|
||||
@PostMapping("/exportScrapList")
|
||||
public void exportScrapList(HttpServletResponse response, ScrapRecordInfo bean) {
|
||||
List<ScrapRecordInfo> list = complexQueryService.getScrapList(bean);
|
||||
ExcelUtil<ScrapRecordInfo> util = new ExcelUtil<>(ScrapRecordInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--导出待报废设备详情");
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已审核报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--查询已审核报废设备详情")
|
||||
@GetMapping("/getScrapAuditList")
|
||||
public AjaxResult getScrapAuditList(ScrapAuditInfo bean) {
|
||||
startPage();
|
||||
List<ScrapAuditInfo> list = complexQueryService.getScrapAuditList(bean);
|
||||
return AjaxResult.success(getDataTable(list));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出已审核报废设备详情
|
||||
* @param response
|
||||
* @param bean
|
||||
*/
|
||||
@ApiOperation(value = "综合查询--导出已审核报废设备详情")
|
||||
@PostMapping("/exportScrapAuditList")
|
||||
public void exportScrapAuditList(HttpServletResponse response, ScrapAuditInfo bean) {
|
||||
List<ScrapAuditInfo> list = complexQueryService.getScrapAuditList(bean);
|
||||
ExcelUtil<ScrapAuditInfo> util = new ExcelUtil<>(ScrapAuditInfo.class);
|
||||
util.exportExcel(response, list, "综合查询--导出已审核报废设备详情");
|
||||
}
|
||||
|
||||
/**
|
||||
* 工程机具使用列表
|
||||
* @param bean
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat;
|
|||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 综合查询-机具出库列表查询
|
||||
|
|
@ -105,6 +106,6 @@ public class OutRecordInfo {
|
|||
@ApiModelProperty(value = "二级ID")
|
||||
private Integer secondTypeId;
|
||||
|
||||
@ApiModelProperty(value = "一级ID")
|
||||
private Integer firstTypeId;
|
||||
@ApiModelProperty(value = "一级ID集合")
|
||||
private List<Integer> firstTypeIdList;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.material.basic.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 已报废审核详情
|
||||
* @Author ma_sh
|
||||
* @create 2025/3/7 9:23
|
||||
*/
|
||||
@Data
|
||||
public class ScrapAuditInfo {
|
||||
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "机具名称")
|
||||
@Excel(name = "机具名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格ID")
|
||||
private Integer typeId;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "购置单价")
|
||||
@Excel(name = "原值(元)")
|
||||
private BigDecimal buyPrice;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "报废人员")
|
||||
@Excel(name = "报废人员")
|
||||
private String scrapBy;
|
||||
|
||||
@ApiModelProperty(value = "审核人员")
|
||||
@Excel(name = "审核人员")
|
||||
private String auditBy;
|
||||
|
||||
@ApiModelProperty(value = "审核时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date auditTime;
|
||||
|
||||
@ApiModelProperty(value = "报废类型")
|
||||
@Excel(name = "报废类型")
|
||||
private String scrapType;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.material.basic.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 待报废详情
|
||||
* @Author ma_sh
|
||||
* @create 2025/3/7 9:23
|
||||
*/
|
||||
@Data
|
||||
public class ScrapRecordInfo {
|
||||
|
||||
@ApiModelProperty(value = "主键id")
|
||||
private Integer id;
|
||||
|
||||
@ApiModelProperty(value = "机具名称")
|
||||
@Excel(name = "机具名称")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "规格ID")
|
||||
private Integer typeId;
|
||||
|
||||
@ApiModelProperty(value = "规格型号")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeModelName;
|
||||
|
||||
@ApiModelProperty(value = "购置单价")
|
||||
@Excel(name = "原值(元)")
|
||||
private BigDecimal buyPrice;
|
||||
|
||||
@ApiModelProperty(value = "设备编码")
|
||||
@Excel(name = "设备编码")
|
||||
private String maCode;
|
||||
|
||||
@ApiModelProperty(value = "报废人员")
|
||||
@Excel(name = "报废人员")
|
||||
private String scrapBy;
|
||||
|
||||
@ApiModelProperty(value = "审核人员")
|
||||
@Excel(name = "审核人员")
|
||||
private String auditBy;
|
||||
|
||||
@ApiModelProperty(value = "报废时间")
|
||||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@Excel(name = "报废时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date scrapTime;
|
||||
|
||||
@ApiModelProperty(value = "报废类型")
|
||||
@Excel(name = "报废类型")
|
||||
private String scrapType;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
}
|
||||
|
|
@ -109,4 +109,18 @@ public interface ComplexQueryMapper {
|
|||
* @return
|
||||
*/
|
||||
UseStorageInfo selectInFo(UseStorageInfo useStorageInfo);
|
||||
|
||||
/**
|
||||
* 查询待报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<ScrapRecordInfo> getScrapList(ScrapRecordInfo bean);
|
||||
|
||||
/**
|
||||
* 查询已审核报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<ScrapAuditInfo> getScrapAuditList(ScrapAuditInfo bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,4 +87,18 @@ public interface ComplexQueryService {
|
|||
* @return
|
||||
*/
|
||||
List<RepairInputRecord> getRepairInputList(RepairInputRecord bean);
|
||||
|
||||
/**
|
||||
* 查询待报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<ScrapRecordInfo> getScrapList(ScrapRecordInfo bean);
|
||||
|
||||
/**
|
||||
* 查询已审核报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
List<ScrapAuditInfo> getScrapAuditList(ScrapAuditInfo bean);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -483,4 +483,24 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
|||
return complexQueryMapper.getRepairInputList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询待报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ScrapRecordInfo> getScrapList(ScrapRecordInfo bean) {
|
||||
return complexQueryMapper.getScrapList(bean);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询已审核报废设备详情
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<ScrapAuditInfo> getScrapAuditList(ScrapAuditInfo bean) {
|
||||
return complexQueryMapper.getScrapAuditList(bean);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.bonus.material.lease.controller;
|
|||
|
||||
import cn.hutool.core.convert.Convert;
|
||||
import com.bonus.common.biz.config.ListPagingUtil;
|
||||
import com.bonus.common.biz.domain.LeaseRecordInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeasePublishInfo;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
|
|
@ -10,47 +11,31 @@ import com.bonus.common.core.web.controller.BaseController;
|
|||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.log.annotation.SysLog;
|
||||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.LeasePublishDetails;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.material.lease.service.ILeaseApplyInfoService;
|
||||
import com.bonus.material.lease.service.ILeaseTaskService;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
||||
import com.bonus.material.ma.domain.vo.StandardConfigDetailsVo;
|
||||
import com.bonus.system.api.RemoteFileService;
|
||||
import com.itextpdf.text.Paragraph;
|
||||
|
||||
import feign.Param;
|
||||
import fr.opensagres.poi.xwpf.converter.pdf.PdfConverter;
|
||||
import fr.opensagres.poi.xwpf.converter.pdf.PdfOptions;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.BooleanUtils;
|
||||
import org.apache.poi.xwpf.usermodel.*;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.mock.web.MockMultipartFile;
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.awt.*;
|
||||
import java.io.*;
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.net.URL;
|
||||
import java.text.ParseException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalDateTime;
|
||||
import java.time.format.DateTimeFormatter;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.awt.Font;
|
||||
|
||||
/**
|
||||
* @author hay
|
||||
|
|
@ -107,6 +92,20 @@ public class LeaseTaskController extends BaseController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出领料记录查询
|
||||
* @param response
|
||||
* @param leaseApplyInfo
|
||||
*/
|
||||
@ApiOperation(value = "导出领料记录查询")
|
||||
@PostMapping("/exportLeaseRecord")
|
||||
public void exportLeaseRecord(HttpServletResponse response, LeaseApplyInfo leaseApplyInfo) {
|
||||
List<LeaseRecordInfo> list = service.getLeaseRecordList(leaseApplyInfo);
|
||||
ExcelUtil<LeaseRecordInfo> util = new ExcelUtil<>(LeaseRecordInfo.class);
|
||||
util.exportExcel(response, list, "领料记录查询数据");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 领用发布查询
|
||||
* @param leaseApplyInfo
|
||||
|
|
@ -144,6 +143,20 @@ public class LeaseTaskController extends BaseController {
|
|||
return success(service.getDetailsById(leaseApplyInfo));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出领料发布详情
|
||||
* @param response
|
||||
* @param leaseApplyInfo
|
||||
*/
|
||||
@ApiOperation(value = "导出领料发布详情")
|
||||
@PostMapping("/exportPublishDetails")
|
||||
public void exportPublishDetails(HttpServletResponse response, LeaseApplyInfo leaseApplyInfo) {
|
||||
List<LeasePublishDetails> list = service.getPublishDetails(leaseApplyInfo);
|
||||
ExcelUtil<LeasePublishDetails> util = new ExcelUtil<>(LeasePublishDetails.class);
|
||||
util.exportExcel(response, list, "领料发布详情数据");
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 发布数据保存
|
||||
* @param leaseApplyRequestVo
|
||||
|
|
@ -155,6 +168,17 @@ public class LeaseTaskController extends BaseController {
|
|||
return service.addPublish(leaseApplyRequestVo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 领用发布终结
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "领用发布终结")
|
||||
@PostMapping("/endPublish")
|
||||
public AjaxResult endPublish(@RequestBody LeaseApplyInfo leaseApplyInfo) {
|
||||
return service.endPublish(leaseApplyInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出领料发布列表
|
||||
* @param response
|
||||
|
|
|
|||
|
|
@ -0,0 +1,145 @@
|
|||
package com.bonus.material.lease.domain;
|
||||
|
||||
import com.bonus.common.core.annotation.Excel;
|
||||
import com.bonus.common.core.web.domain.BaseEntity;
|
||||
import com.bonus.material.back.domain.vo.MaCodeVo;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.ToString;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 领料任务详细对象 lease_apply_details
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Data
|
||||
@ToString
|
||||
public class LeasePublishDetails extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty(value = "机具ID")
|
||||
private Long maId;
|
||||
|
||||
/** 物资类型 */
|
||||
@ApiModelProperty(value = "物资类型名称")
|
||||
@Excel(name = "类型名称")
|
||||
private String maTypeName;
|
||||
|
||||
/** 规格型号id */
|
||||
@ApiModelProperty(value = "规格型号id")
|
||||
private Long typeId;
|
||||
|
||||
@ApiModelProperty(value = "规格型号id")
|
||||
private Long newTypeId;
|
||||
|
||||
@ApiModelProperty(value = "三级id")
|
||||
private Long thirdTypeId;
|
||||
|
||||
@ApiModelProperty(value = "规格型号id")
|
||||
private Long taskId;
|
||||
|
||||
/** 规格型号 */
|
||||
@ApiModelProperty(value = "规格型号名称")
|
||||
@Excel(name = "规格型号")
|
||||
private String typeName;
|
||||
|
||||
@ApiModelProperty(value = "机具编码")
|
||||
private String maCode;
|
||||
|
||||
/** 计量单位 */
|
||||
@ApiModelProperty(value = "计量单位")
|
||||
@Excel(name = "计量单位")
|
||||
private String unitName;
|
||||
|
||||
/** 计量单位数值 */
|
||||
@ApiModelProperty(value = "计量单位数值")
|
||||
private String unitValue;
|
||||
|
||||
@Excel(name = "需求数量")
|
||||
@ApiModelProperty(value = "需求数量")
|
||||
private BigDecimal preNum;
|
||||
|
||||
/** 库存数量 */
|
||||
@ApiModelProperty(value = "库存数量")
|
||||
@Excel(name = "当前库存")
|
||||
private BigDecimal storageNum;
|
||||
|
||||
@ApiModelProperty(value = "已发布数量")
|
||||
@Excel(name = "已发布数量")
|
||||
private BigDecimal publishNum;
|
||||
|
||||
@ApiModelProperty(value = "剩余最大出库数量")
|
||||
@Excel(name = "已供应数量")
|
||||
private BigDecimal outNum;
|
||||
|
||||
@ApiModelProperty(value = "待发布数量")
|
||||
@Excel(name = "待发布数量")
|
||||
private BigDecimal pendingNum;
|
||||
|
||||
@ApiModelProperty(value = "本次发布数量")
|
||||
private BigDecimal num;
|
||||
|
||||
/** 审批数量 */
|
||||
@ApiModelProperty(value = "审批数量")
|
||||
private BigDecimal auditNum;
|
||||
|
||||
/** 已领数量 */
|
||||
@ApiModelProperty(value = "已领数量")
|
||||
private BigDecimal alNum;
|
||||
|
||||
/** 备注 */
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 装备管理方式(0编号 1计数)
|
||||
*/
|
||||
@ApiModelProperty(name = "装备管理方式")
|
||||
private int manageType;
|
||||
|
||||
/** 状态(0待审批,1进行中,2已出库) */
|
||||
private String status;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
private String keyword;
|
||||
|
||||
@ApiModelProperty(value = "用户ID")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "编码类型集合")
|
||||
private List<MaCodeVo> maCodeVoList;
|
||||
|
||||
@ApiModelProperty(value = "往来单位id")
|
||||
private Long unitId;
|
||||
|
||||
@ApiModelProperty(value = "工程id")
|
||||
private Long projectId;
|
||||
|
||||
@ApiModelProperty(value = "领料人")
|
||||
private String leasePerson;
|
||||
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
private String phone;
|
||||
|
||||
@ApiModelProperty(value = "任务当月序号 例如:1 插入及查询时请携带任务类型")
|
||||
private Integer monthOrder;
|
||||
|
||||
@ApiModelProperty(value = "发布批次")
|
||||
private String publishTask;
|
||||
|
||||
}
|
||||
|
|
@ -141,4 +141,11 @@ public interface LeaseTaskMapper {
|
|||
* @return
|
||||
*/
|
||||
int getMonthMaxOrderByDate(@Param("year") String year, @Param("month") String month);
|
||||
|
||||
/**
|
||||
* 根据taskId查询状态
|
||||
* @param taskId
|
||||
* @return
|
||||
*/
|
||||
Integer selectStatusByTaskId(Long taskId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,14 +1,15 @@
|
|||
package com.bonus.material.lease.service;
|
||||
|
||||
|
||||
import com.bonus.common.biz.domain.LeaseRecordInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeasePublishInfo;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.LeasePublishDetails;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.material.lease.domain.vo.LeaseDeptInfo;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
||||
|
||||
import java.util.List;
|
||||
|
|
@ -114,5 +115,26 @@ public interface ILeaseTaskService {
|
|||
* @return
|
||||
*/
|
||||
AjaxResult addPublish(LeaseApplyRequestVo leaseApplyRequestVo);
|
||||
|
||||
/**
|
||||
* 领用发布终结
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
AjaxResult endPublish(LeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
/**
|
||||
* 导出领料发布详情
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
List<LeasePublishDetails> getPublishDetails(LeaseApplyInfo leaseApplyInfo);
|
||||
|
||||
/**
|
||||
* 导出领料记录查询
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
List<LeaseRecordInfo> getLeaseRecordList(LeaseApplyInfo leaseApplyInfo);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,18 +3,22 @@ package com.bonus.material.lease.service.impl;
|
|||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.bonus.common.biz.constant.MaterialConstants;
|
||||
import com.bonus.common.biz.domain.BmFileInfo;
|
||||
import com.bonus.common.biz.domain.LeaseRecordInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.common.biz.domain.lease.LeasePublishInfo;
|
||||
import com.bonus.common.biz.enums.HttpCodeEnum;
|
||||
import com.bonus.common.biz.enums.LeaseTaskStatusEnum;
|
||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.utils.bean.BeanUtils;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.security.utils.SecurityUtils;
|
||||
import com.bonus.material.back.domain.vo.MaCodeVo;
|
||||
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
import com.bonus.material.lease.domain.LeasePublishDetails;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.material.lease.domain.vo.LeaseDeptInfo;
|
||||
import com.bonus.material.lease.mapper.LeaseApplyDetailsMapper;
|
||||
|
|
@ -22,16 +26,12 @@ import com.bonus.material.lease.mapper.LeaseApplyInfoMapper;
|
|||
import com.bonus.material.lease.mapper.LeaseTaskMapper;
|
||||
import com.bonus.material.lease.service.ILeaseTaskService;
|
||||
import com.bonus.material.ma.domain.Type;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVo;
|
||||
import com.bonus.material.ma.domain.vo.MaTypeVoLevelTwo;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
import com.bonus.material.task.domain.TmTaskAgreement;
|
||||
import com.bonus.material.task.mapper.TmTaskAgreementMapper;
|
||||
import com.bonus.material.task.mapper.TmTaskMapper;
|
||||
import com.bonus.material.work.domain.SysWorkflowNode;
|
||||
import com.bonus.material.work.domain.SysWorkflowRecord;
|
||||
import com.bonus.material.work.domain.SysWorkflowRecordHistory;
|
||||
import com.bonus.material.work.domain.SysWorkflowType;
|
||||
import com.bonus.material.work.mapper.*;
|
||||
import com.bonus.material.work.service.SysWorkflowRecordService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
@ -165,7 +165,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
});
|
||||
}
|
||||
if(statusFlag!= null && statusFlag == 0){
|
||||
sysWorkflowRecordService.addSysWorkflowRecord(tmTask.getTaskId().intValue(),taskCode,2);
|
||||
sysWorkflowRecordService.addSysWorkflowRecord(tmTask.getTaskId().intValue(),taskCode,19);
|
||||
}
|
||||
if (count > 0) {
|
||||
return insertPurchaseCheckDetails(leaseApplyRequestVo.getLeaseApplyDetailsList(), leaseApplyRequestVo.getLeaseApplyInfo().getId());
|
||||
|
|
@ -191,6 +191,16 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
leaseApplyInfo.setUserId(userId == 0 ? null : userId);
|
||||
List<LeaseApplyInfo> list = mapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
for (LeaseApplyInfo applyInfo : list) {
|
||||
// 根据任务id查询sys_workflow_record表,看任务是否已经开始,修改tm_task表状态为审核中
|
||||
Integer status = mapper.selectStatusByTaskId(applyInfo.getTaskId());
|
||||
if (status != null && status == 1) {
|
||||
applyInfo.setTaskStatus(LeaseTaskStatusEnum.LEASE_AUDIT_ING.getStatus());
|
||||
applyInfo.setTaskStatusName(LeaseTaskStatusEnum.LEASE_AUDIT_ING.getStatusName());
|
||||
mapper.updateLeaseTaskStatus(applyInfo.getTaskId(), LeaseTaskStatusEnum.LEASE_AUDIT_ING.getStatus());
|
||||
}
|
||||
}
|
||||
Integer taskStatus = leaseApplyInfo.getTaskStatus();
|
||||
String keyWord = leaseApplyInfo.getKeyWord();
|
||||
// 如果关键字不为空,进行过滤
|
||||
if (!StringUtils.isBlank(keyWord)) {
|
||||
|
|
@ -198,6 +208,11 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
.filter(item -> containsKeyword(item, keyWord))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
if (taskStatus != null) {
|
||||
list = list.stream()
|
||||
.filter(item -> item.getTaskStatus().equals(taskStatus))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
|
@ -704,7 +719,7 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
boolean allMatch = true;
|
||||
if (!CollectionUtils.isEmpty(leaseApplyDetails)) {
|
||||
for (LeaseApplyDetails leaseApplyDetail : leaseApplyDetails) {
|
||||
if (leaseApplyDetail.getPreNum().compareTo(leaseApplyDetail.getPublishNum()) != 0) {
|
||||
if (leaseApplyDetail.getPreNum().compareTo(leaseApplyDetail.getPublishNum()) <= 0) {
|
||||
allMatch = false;
|
||||
break;
|
||||
}
|
||||
|
|
@ -726,6 +741,63 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 结束发布
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AjaxResult endPublish(LeaseApplyInfo leaseApplyInfo) {
|
||||
if (leaseApplyInfo == null || leaseApplyInfo.getTaskId() == null) {
|
||||
return AjaxResult.error("参数不能为空");
|
||||
}
|
||||
// 根据taskId修改任务状态为终结
|
||||
int result = tmTaskMapper.updateTaskStatus(String.valueOf(leaseApplyInfo.getTaskId()), LeaseTaskStatusEnum.LEASE_TASK_TO_AUDIT.getStatus());
|
||||
if (result == 0) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
return AjaxResult.success(HttpCodeEnum.SUCCESS.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出领料发布详情
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LeasePublishDetails> getPublishDetails(LeaseApplyInfo leaseApplyInfo) {
|
||||
List<LeasePublishDetails> list = new ArrayList<>();
|
||||
// 获取领料单详情
|
||||
List<LeaseApplyDetails> details = mapper.selectPublishDetails(leaseApplyInfo);
|
||||
if (!CollectionUtils.isEmpty(details)) {
|
||||
for (LeaseApplyDetails detail : details) {
|
||||
LeasePublishDetails leasePublishDetails = new LeasePublishDetails();
|
||||
BeanUtils.copyProperties(detail, leasePublishDetails);
|
||||
list.add(leasePublishDetails);
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出领料记录查询
|
||||
* @param leaseApplyInfo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<LeaseRecordInfo> getLeaseRecordList(LeaseApplyInfo leaseApplyInfo) {
|
||||
List<LeaseRecordInfo> leaseRecordInfos = new ArrayList<>();
|
||||
List<LeaseApplyInfo> list = selectLeaseApplyInfoList(leaseApplyInfo);
|
||||
if (!CollectionUtils.isEmpty(list)) {
|
||||
for (LeaseApplyInfo applyInfo : list) {
|
||||
LeaseRecordInfo leaseRecordInfo = new LeaseRecordInfo();
|
||||
BeanUtils.copyProperties(applyInfo, leaseRecordInfo);
|
||||
leaseRecordInfos.add(leaseRecordInfo);
|
||||
}
|
||||
}
|
||||
return leaseRecordInfos;
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成发布批次任务
|
||||
* @param thisMonthMaxOrder
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
@ApiOperation("查询修试审核任务列表")
|
||||
@GetMapping("/questList")
|
||||
@SysLog(title = "查询修试审核任务列表", businessType = OperaType.QUERY, module = "机具系统->查询修试审核任务列表")
|
||||
@RequiresPermissions("service:auditing:list")
|
||||
//@RequiresPermissions("service:auditing:list")
|
||||
public AjaxResult questList(RepairAuditDetails repairAuditDetails) {
|
||||
Integer pageIndex = Convert.toInt(ServletUtils.getParameter("pageNum"), 1);
|
||||
Integer pageSize = Convert.toInt(ServletUtils.getParameter("pageSize"), 10);
|
||||
|
|
@ -100,7 +100,7 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
*/
|
||||
@ApiOperation("查看修饰审核任务详细列表")
|
||||
@GetMapping("/getRepairAuditList")
|
||||
@RequiresPermissions("service:auditing:list")
|
||||
//@RequiresPermissions("service:auditing:list")
|
||||
public AjaxResult getRepairAuditList(RepairAuditDetails repairAuditDetails) {
|
||||
List<RepairAuditDetails> list = repairAuditDetailsService.getRepairAuditList(repairAuditDetails);
|
||||
return AjaxResult.success(list);
|
||||
|
|
@ -214,7 +214,7 @@ public class RepairAuditDetailsController extends BaseController {
|
|||
|
||||
@ApiOperation(value = "(外层)批量修改修试审核详细")
|
||||
@PreventRepeatSubmit
|
||||
@RequiresPermissions("repair:details:edit")
|
||||
//@RequiresPermissions("repair:details:edit")
|
||||
@SysLog(title = "批量修试审核详细", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->批量修改修试审核详细")
|
||||
@PostMapping("/outerAudit")
|
||||
public AjaxResult outerAudit(@RequestBody @NotNull List<RepairAuditDetails> repairAuditDetails) {
|
||||
|
|
|
|||
|
|
@ -380,19 +380,23 @@ public class ScrapApplyDetailsServiceImpl implements IScrapApplyDetailsService {
|
|||
if (scrapApplyDetails == null || CollectionUtils.isEmpty(scrapApplyDetails.getIdList())) {
|
||||
return AjaxResult.error("参数为空");
|
||||
}
|
||||
// 根据传参修改报废状态
|
||||
int result = 0;
|
||||
for (Long id : scrapApplyDetails.getIdList()) {
|
||||
scrapApplyDetails.setId(id);
|
||||
scrapApplyDetails.setLedgerStatus("1");
|
||||
scrapApplyDetails.setLedgerBy(SecurityUtils.getUserId());
|
||||
scrapApplyDetails.setLedgerTime(DateUtils.getNowDate());
|
||||
result += scrapApplyDetailsMapper.ledgerApprove(scrapApplyDetails);
|
||||
try {
|
||||
// 根据传参修改报废状态
|
||||
int result = 0;
|
||||
for (Long id : scrapApplyDetails.getIdList()) {
|
||||
scrapApplyDetails.setId(id);
|
||||
scrapApplyDetails.setLedgerStatus("1");
|
||||
scrapApplyDetails.setLedgerBy(SecurityUtils.getUserId());
|
||||
scrapApplyDetails.setLedgerTime(DateUtils.getNowDate());
|
||||
result += scrapApplyDetailsMapper.ledgerApprove(scrapApplyDetails);
|
||||
}
|
||||
if (result > 0) {
|
||||
return AjaxResult.success("审核通过");
|
||||
}
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
} catch (Exception e) {
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
if (result > 0) {
|
||||
return AjaxResult.success("审核通过");
|
||||
}
|
||||
return AjaxResult.error(HttpCodeEnum.FAIL.getCode(), HttpCodeEnum.FAIL.getMsg());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -108,8 +108,8 @@ public class SysWorkflowRecordHistoryServiceImpl implements SysWorkflowRecordHis
|
|||
}
|
||||
// 根据任务类型修改业务状态
|
||||
switch (sysWorkflowRecodeInfo.getTaskType()) {
|
||||
// 领料任务:2
|
||||
case 2:
|
||||
// 领用任务:19
|
||||
case 19:
|
||||
//修改业务状态
|
||||
TmTask tmTask = new TmTask();
|
||||
tmTask.setTaskId(sysWorkflowRecordHistory.getTaskId().longValue());
|
||||
|
|
|
|||
|
|
@ -363,8 +363,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<if test="typeModelName != null and typeModelName != ''">
|
||||
and bs.type_model_name like CONCAT('%',#{typeModelName},'%')
|
||||
</if>
|
||||
<if test="firstTypeId != null ">
|
||||
and mt3.type_id = #{firstTypeId}
|
||||
<if test="firstTypeIdList != null and firstTypeIdList.size > 0">
|
||||
and mt3.type_id in
|
||||
<foreach collection="firstTypeIdList" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="startTime != null and startTime != '' and endTime != null and endTime != ''">
|
||||
AND bs.create_time BETWEEN CONCAT(#{startTime}, ' 00:00:00') AND CONCAT(#{endTime}, ' 23:59:59')
|
||||
|
|
@ -816,4 +819,79 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
LIMIT 1
|
||||
</select>
|
||||
|
||||
<select id="getScrapList" resultType="com.bonus.material.basic.domain.ScrapRecordInfo">
|
||||
SELECT mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
mt.buy_price AS buyPrice,
|
||||
mm.ma_code AS maCode,
|
||||
sad.create_by AS scrapBy,
|
||||
su.nick_name AS auditBy,
|
||||
sad.create_time AS scrapTime,
|
||||
CASE
|
||||
sad.scrap_source
|
||||
WHEN '1' then '退料报废'
|
||||
WHEN '2' then '维修报废'
|
||||
WHEN '3' then '盘点报废'
|
||||
ELSE ''
|
||||
END
|
||||
as scrapType
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = sad.ma_id
|
||||
LEFT JOIN sys_user su ON sad.audit_by = su.user_id
|
||||
WHERE 1 = 1
|
||||
<if test="typeId != null">
|
||||
AND sad.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
||||
mt.type_name like concat('%',#{keyWord},'%') or
|
||||
su.nick_name like concat('%',#{keyWord},'%') or
|
||||
sad.create_by like concat('%',#{keyWord},'%') or
|
||||
mm.ma_code like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_code ,mt.type_id
|
||||
</select>
|
||||
|
||||
<select id="getScrapAuditList" resultType="com.bonus.material.basic.domain.ScrapAuditInfo">
|
||||
SELECT mt2.type_name AS typeName,
|
||||
mt.type_name AS typeModelName,
|
||||
mt.buy_price AS buyPrice,
|
||||
mm.ma_code AS maCode,
|
||||
sad.create_by AS scrapBy,
|
||||
su2.nick_name AS auditBy,
|
||||
sad.ledger_time AS auditTime,
|
||||
CASE
|
||||
sad.scrap_source
|
||||
WHEN '1' then '退料报废'
|
||||
WHEN '2' then '维修报废'
|
||||
WHEN '3' then '盘点报废'
|
||||
ELSE ''
|
||||
END
|
||||
as scrapType
|
||||
FROM scrap_apply_details sad
|
||||
LEFT JOIN ma_type mt ON mt.type_id = sad.type_id
|
||||
LEFT JOIN ma_type mt2 ON mt.parent_id = mt2.type_id
|
||||
LEFT JOIN ma_machine mm ON mm.ma_id = sad.ma_id
|
||||
LEFT JOIN sys_user su2 ON sad.ledger_by = su2.user_id
|
||||
WHERE
|
||||
sad.ledger_status = '1'
|
||||
<if test="typeId != null">
|
||||
AND sad.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
mt2.type_name like concat('%',#{keyWord},'%') or
|
||||
mt.type_name like concat('%',#{keyWord},'%') or
|
||||
sad.create_by like concat('%',#{keyWord},'%') or
|
||||
su2.nick_name like concat('%',#{keyWord},'%') or
|
||||
mm.ma_code like concat('%',#{keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY mm.ma_code ,mt.type_id
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -105,6 +105,43 @@
|
|||
<result property="isTest" column="is_test"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.bonus.common.biz.domain.lease.LeasePublishInfo" id="LeasePublishInfoResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="code" column="code"/>
|
||||
<result property="taskId" column="task_id"/>
|
||||
<result property="leasePerson" column="lease_person"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="companyAuditBy" column="company_audit_by"/>
|
||||
<result property="companyAuditTime" column="company_audit_time"/>
|
||||
<result property="companyAuditRemark" column="company_audit_remark"/>
|
||||
<result property="deptAuditBy" column="dept_audit_by"/>
|
||||
<result property="deptAuditTime" column="dept_audit_time"/>
|
||||
<result property="deptAuditRemark" column="dept_audit_remark"/>
|
||||
<result property="directAuditBy" column="direct_audit_by"/>
|
||||
<result property="directAuditTime" column="direct_audit_time"/>
|
||||
<result property="directAuditRemark" column="direct_audit_remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="companyId" column="company_id"/>
|
||||
<result property="directId" column="direct_id"/>
|
||||
<result property="leaseType" column="lease_type"/>
|
||||
<result property="estimateLeaseTime" column="estimate_lease_time"/>
|
||||
<result property="costBearingParty" column="cost_bearing_party"/>
|
||||
<result property="leaseProject" column="pro_name"/>
|
||||
<result property="leaseProjectId" column="project_id"/>
|
||||
<result property="leaseUnit" column="unit_name"/>
|
||||
<result property="leaseUnitId" column="unit_id"/>
|
||||
<result property="agreementId" column="agreement_id"/>
|
||||
<result property="agreementCode" column="agreement_code"/>
|
||||
<result property="leaseSignUrl" column="lease_sign_url"/>
|
||||
<result property="leaseSignType" column="lease_sign_type"/>
|
||||
<result property="applyCode" column="apply_code"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
<sql id="selectLeaseApplyInfoVo">
|
||||
|
|
@ -348,21 +385,25 @@
|
|||
|
||||
case tt.task_status
|
||||
when 0 then '待审核'
|
||||
when 1 then '待审核'
|
||||
when 2 then '审核中'
|
||||
when 1 then '已完成'
|
||||
when 3 then '已完成'
|
||||
when 4 then '已完成'
|
||||
when 6 then '审核中'
|
||||
end as taskStatusName,
|
||||
IFNULL(sum(lad.pre_num),0) as preCountNum,
|
||||
IFNULL(sum(lad.al_num),0) as alNum,
|
||||
GROUP_CONCAT(DISTINCT mt1.type_name) AS maTypeNames,
|
||||
bp.contract_part as contractPart,
|
||||
sd.dept_name as impUnitName
|
||||
sd.dept_name as impUnitName,
|
||||
bai.agreement_code
|
||||
from
|
||||
lease_apply_info lai
|
||||
left join tm_task tt on lai.task_id = tt.task_id
|
||||
left join lease_apply_details lad on lai.id = lad.parent_id
|
||||
left join tm_task_agreement tta on lai.task_id = tta.task_id
|
||||
LEFT JOIN (SELECT parent_id, unit_id, project_id from lease_publish_details
|
||||
GROUP BY parent_id ) a on a.parent_id = lai.id
|
||||
LEFT JOIN bm_agreement_info bai on a.unit_id = bai.unit_id
|
||||
and a.project_id = bai.project_id
|
||||
left join bm_unit bu on bu.unit_id = lai.unit_id
|
||||
left join bm_project bp on bp.pro_id = lai.project_id
|
||||
left join sys_dept sd on sd.dept_id = bp.imp_unit
|
||||
|
|
@ -741,7 +782,7 @@
|
|||
</select>
|
||||
|
||||
<select id="getPublishList" resultType="com.bonus.common.biz.domain.lease.LeasePublishInfo"
|
||||
resultMap="LeaseApplyInfoResult">
|
||||
resultMap="LeasePublishInfoResult">
|
||||
select
|
||||
lai.id, lai.code, lai.task_id, lai.lease_person, lai.phone, lai.type, lai.company_audit_by,lai.apply_code,
|
||||
lai.company_audit_time, lai.company_audit_remark, lai.dept_audit_by, lai.dept_audit_time,
|
||||
|
|
@ -753,7 +794,7 @@
|
|||
|
||||
case tt.task_status
|
||||
when 1 then '未完成'
|
||||
when 2 then '已终结'
|
||||
when 2 then '已终止'
|
||||
when 3 then '已完成'
|
||||
end as taskStatusName,
|
||||
IFNULL(sum(lad.pre_num),0) as preCountNum,
|
||||
|
|
@ -778,6 +819,9 @@
|
|||
</if>
|
||||
where tt.task_type = '19'
|
||||
and tt.task_status in (1, 2, 3)
|
||||
<!--<if test="taskStatus != null and taskStatus != ''">
|
||||
and tt.task_status = #{taskStatus}
|
||||
</if>
|
||||
<if test="taskId != null ">and lai.task_id = #{taskId}</if>
|
||||
<if test="statusList != null and statusList.size() > 0">
|
||||
and tt.task_status in
|
||||
|
|
@ -789,7 +833,7 @@
|
|||
AND DATE_FORMAT( lai.create_time, '%Y-%m-%d' ) BETWEEN #{startTime} AND #{endTime}
|
||||
</if>
|
||||
<if test="isApp != null and taskStatus==1">and (tt.task_status = 0 or tt.task_status = 1 or tt.task_status = 2) </if>
|
||||
<if test="isApp != null and taskStatus==3">and (tt.task_status = 3 or tt.task_status = 4)</if>
|
||||
<if test="isApp != null and taskStatus==3">and (tt.task_status = 3 or tt.task_status = 4)</if>-->
|
||||
GROUP BY lai.id
|
||||
ORDER BY tt.task_status,tt.create_time desc
|
||||
</select>
|
||||
|
|
@ -813,4 +857,10 @@
|
|||
where
|
||||
month(create_time) = #{month} and year(create_time) = #{year}
|
||||
</select>
|
||||
|
||||
<select id="selectStatusByTaskId" resultType="java.lang.Integer">
|
||||
select workflow_status from sys_workflow_record
|
||||
where
|
||||
task_id = #{taskId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue