From 0f4ae97bad00a691b429c86f9cf29a76b024177c Mon Sep 17 00:00:00 2001 From: "liang.chao" Date: Wed, 27 Mar 2024 18:15:32 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=80=E6=96=99=E5=87=BA=E5=BA=93=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=E6=8F=90=E4=BA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../sgzb/app/controller/TmTaskController.java | 52 +++-- .../com/bonus/sgzb/app/domain/TmTask.java | 7 +- .../com/bonus/sgzb/app/domain/TmTaskDto.java | 203 +++++++++------- .../com/bonus/sgzb/app/domain/TmTaskVo.java | 217 ++++++++++++++++++ .../app/service/impl/TmTaskServiceImpl.java | 2 +- .../resources/mapper/app/TmTaskMapper.xml | 19 +- .../WorkSiteDirectManageController.java | 4 +- .../sgzb/material/domain/LeaseApplyInfo.java | 4 + .../impl/WorkSiteDirectManageImpl.java | 7 +- .../material/WorkSiteDirectManageMapper.xml | 14 +- 10 files changed, 415 insertions(+), 114 deletions(-) create mode 100644 sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTaskVo.java diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/TmTaskController.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/TmTaskController.java index b9eba69d..d565a1b7 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/TmTaskController.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/controller/TmTaskController.java @@ -2,10 +2,7 @@ package com.bonus.sgzb.app.controller; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.convert.Convert; -import com.bonus.sgzb.app.domain.LeaseApplyDetails; -import com.bonus.sgzb.app.domain.LeaseApplyInfo; -import com.bonus.sgzb.app.domain.TmTask; -import com.bonus.sgzb.app.domain.TmTaskDto; +import com.bonus.sgzb.app.domain.*; import com.bonus.sgzb.app.service.LeaseApplyDetailsService; import com.bonus.sgzb.app.service.LeaseApplyInfoService; import com.bonus.sgzb.app.service.LeaseUserBookService; @@ -89,6 +86,7 @@ public class TmTaskController extends BaseController { /** * 领料审核驳回,分公司,分管,机具分公司统一接口 + * * @param task 任务信息 * @return */ @@ -157,6 +155,7 @@ public class TmTaskController extends BaseController { /** * 往来单位提交工程领用机具信息 + * * @return 结果 */ @Log(title = "往来单位提交领料申请", businessType = BusinessType.INSERT) @@ -426,43 +425,46 @@ public class TmTaskController extends BaseController { } else { //领料管理导出 List leaseAuditManageList = tmTaskService.getLeaseAuditManageList(task); - List tmTaskDtos = Convert.toList(TmTaskDto.class, leaseAuditManageList); - ExcelUtil util = new ExcelUtil(TmTaskDto.class); + List tmTaskDtos = Convert.toList(TmTaskVo.class, leaseAuditManageList); + ExcelUtil util = new ExcelUtil(TmTaskVo.class); util.exportExcel(response, tmTaskDtos, "领料管理数据"); } } /** - * 查询机具领料出库列表 - app + * 查询机具领料出库列表 * * @param task 筛选条件 * @return 列表 */ - @Log(title = "查询机具领料出库列表- app", businessType = BusinessType.QUERY) + @Log(title = "查询机具领料出库列表- app/web", businessType = BusinessType.QUERY) @GetMapping(value = "getLeaseAuditList") public AjaxResult getLeaseAuditList(TmTask task) { if (StringUtils.isNull(task)) { return AjaxResult.error("参数错误"); } - if (SecurityUtils.getLoginUser() != null) { Long userid = SecurityUtils.getLoginUser().getUserid(); task.setUserId(String.valueOf(userid)); } - - List leaseAuditList = tmTaskService.getLeaseOutListByUser(task); - return AjaxResult.success(getDataTable(leaseAuditList)); + if (task.getFlag() == 1) { + startPage(); + List leaseAuditList = tmTaskService.getLeaseOutListByUser(task); + return AjaxResult.success(getDataTable(leaseAuditList)); + } else { + List leaseAuditList = tmTaskService.getLeaseOutListByUser(task); + return AjaxResult.success(getDataTable(leaseAuditList)); + } } - /** - * 查询单个领料出库详情 - app + * 查询单个领料出库详情 * * @param task 筛选条件 * @return 列表 */ - @Log(title = "查询单个领料出库详情- app", businessType = BusinessType.QUERY) + @Log(title = "查询单个领料出库详情- app/web", businessType = BusinessType.QUERY) @GetMapping(value = "getLeaseAuditListDetail") public AjaxResult getLeaseAuditListDetail(TmTask task) { if (StringUtils.isNull(task)) { @@ -477,6 +479,26 @@ public class TmTaskController extends BaseController { return AjaxResult.success(getDataTable(leaseAuditList)); } + /** + * 导出领料出库列表 + * + * @param task 筛选条件 + * @return 列表 + */ + @Log(title = "导出领料出库列表", businessType = BusinessType.QUERY) + @PostMapping(value = "export") + public void export(HttpServletResponse response, TmTask task) { + + if (SecurityUtils.getLoginUser() != null) { + Long userid = SecurityUtils.getLoginUser().getUserid(); + task.setUserId(String.valueOf(userid)); + } + List leaseAuditList = tmTaskService.getLeaseOutListByUser(task); + List tmTaskDtos = Convert.toList(TmTaskDto.class, leaseAuditList); + ExcelUtil util = new ExcelUtil(TmTaskDto.class); + util.exportExcel(response, tmTaskDtos, "领料出库数据"); + } + /** * 修改任务信息 */ diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTask.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTask.java index 4e58b813..cf0b4d9b 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTask.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTask.java @@ -53,12 +53,12 @@ public class TmTask implements Serializable { * 预领料合计数 */ @ApiModelProperty(value="预领料合计数") - private int preCountNum; + private Integer preCountNum; /** * 预领料合计数 */ @ApiModelProperty(value="已出库数量") - private int alNum; + private Integer alNum; /** * 编号 @@ -96,7 +96,7 @@ public class TmTask implements Serializable { * 工程id */ @ApiModelProperty(value="工程id") - private int proId; + private Integer proId; /** * 创建时间 @@ -240,6 +240,7 @@ public class TmTask implements Serializable { @ApiModelProperty(value="领用类型:0 短期租赁 1长期领用") private String leaseType; private String userId; + private String userName; private String typeName; private String typeModelName; diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTaskDto.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTaskDto.java index 5299f528..9c6fc3e0 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTaskDto.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTaskDto.java @@ -2,6 +2,7 @@ package com.bonus.sgzb.app.domain; import com.bonus.sgzb.common.core.annotation.Excel; import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import org.springframework.format.annotation.DateTimeFormat; @@ -11,11 +12,12 @@ import java.util.Date; import java.util.List; /** -* Description: 任务表tm_task -* @Author 阮世耀 -* @Create 2023/12/13 15:14 -* @Version 1.0 -*/ + * Description: 任务表tm_task + * + * @Author 阮世耀 + * @Create 2023/12/13 15:14 + * @Version 1.0 + */ @Data public class TmTaskDto implements Serializable { @@ -25,197 +27,222 @@ public class TmTaskDto implements Serializable { private String id; /** - * 任务ID - */ - @ApiModelProperty(value="任务ID") + * 任务ID + */ + @ApiModelProperty(value = "任务ID") private Long taskId; + private Long parentId; + private Integer outNum; /** - * 任务类型(定义数据字典) - */ - @ApiModelProperty(value="任务类型(数据字典)") + * 任务类型(定义数据字典) + */ + @ApiModelProperty(value = "任务类型(数据字典)") private Integer taskType; /** - * 任务状态(定义数据字典) - */ - @ApiModelProperty(value="任务状态(数据字典)") + * 任务状态(定义数据字典) + */ + @ApiModelProperty(value = "任务状态(数据字典)") private Integer taskStatus; - /** - * 预领料合计数 - */ - @ApiModelProperty(value="预领料合计数") - private int preCountNum; + private Integer flag; /** - * 编号 - */ - @ApiModelProperty(value="编号") - @Excel(name = "领料单号",sort = 1) + * 预领料合计数 + */ + @ApiModelProperty(value = "预领料合计数") + @Excel(name = "申请数量", sort = 4) + private int preCountNum; + /** + * 预领料合计数 + */ + @ApiModelProperty(value = "已出库数量") + @Excel(name = "已出库数量", sort = 6) + private int alNum; + + /** + * 编号 + */ + @ApiModelProperty(value = "领料单号") + @Excel(name = "领料单号", sort = 1) private String code; /** - * 创建者 - */ - @ApiModelProperty(value="创建者") + * 创建者 + */ + @ApiModelProperty(value = "创建者") private String createBy; /** * 申请人手机号码 */ - @ApiModelProperty(value="手机号") + @ApiModelProperty(value = "手机号") private String phoneNumber; /** * 部门名称 单位名称 */ - @ApiModelProperty(value="部门/单位名称") + @ApiModelProperty(value = "部门/单位名称") private String deptName; /** * 工程名称 */ - @ApiModelProperty(value="工程名称") - @Excel(name = "领料工程",sort = 3) + @ApiModelProperty(value = "工程名称") + @Excel(name = "领料申请工程", sort = 3) private String proName; /** - * 创建时间 - */ - @ApiModelProperty(value="创建时间") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + * 工程id + */ + @ApiModelProperty(value = "工程id") + private int proId; + + /** + * 创建时间 + */ + @ApiModelProperty(value = "创建时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + @Excel(name = "申请时间", sort = 5) private Date createTime; /** - * 更新者 - */ - @ApiModelProperty(value="更新者") + * 更新者 + */ + @ApiModelProperty(value = "更新者") private String updateBy; /** - * 更新时间 - */ - @ApiModelProperty(value="更新时间") - @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + * 更新时间 + */ + @ApiModelProperty(value = "更新时间") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") private Date updateTime; /** - * 备注 - */ - @ApiModelProperty(value="备注") - @Excel(name = "备注",sort = 11) + * 备注 + */ + @ApiModelProperty(value = "备注") private String remark; /** - * 数据所属组织 - */ - @ApiModelProperty(value="数据所属组织") + * 数据所属组织 + */ + @ApiModelProperty(value = "数据所属组织") private Integer companyId; /** * 领料任务实体 */ - @ApiModelProperty(value="领料任务实体") + @ApiModelProperty(value = "领料任务实体") private LeaseApplyInfo leaseApplyInfo; /** * 领料任务实体集合 */ - @ApiModelProperty(value="领料任务实体集合") + @ApiModelProperty(value = "领料任务实体集合") private List leaseApplyInfoList; /** * 领料任务详情集合 */ - @ApiModelProperty(value="领料任务详情集合") - private List leaseApplyDetails; + @ApiModelProperty(value = "领料任务详情集合") + private List leaseApplyDetails; - @ApiModelProperty(value="协议id") + @ApiModelProperty(value = "协议id") private Integer agreementId; - @ApiModelProperty(value="退料人") + @ApiModelProperty(value = "退料人") private String backPerson; - @ApiModelProperty(value="退料人联系电话") + @ApiModelProperty(value = "退料人联系电话") private String phone; - @ApiModelProperty(value="退料申请时间") + @ApiModelProperty(value = "退料申请时间") private String backTime; - @ApiModelProperty(value="退料审核人 机具分公司审批人") + @ApiModelProperty(value = "退料审核人 机具分公司审批人") private String directAuditBy; - @ApiModelProperty(value="退料审核时间 机具分公司审批时间") + @ApiModelProperty(value = "退料审核时间 机具分公司审批时间") private String directAuditTime; - @ApiModelProperty(value="退料审核备注 机具分公司审批备注") + @ApiModelProperty(value = "退料审核备注 机具分公司审批备注") private String directAuditRemark; - @ApiModelProperty(value="往来单位id") + @ApiModelProperty(value = "往来单位id") private Long unitId; - @ApiModelProperty(value="往来单位") - @Excel(name = "领料单位",sort = 2) + @ApiModelProperty(value = "往来单位") + @Excel(name = "领料申请单位", sort = 2) private String unitName; - @ApiModelProperty(value="工程id") + @ApiModelProperty(value = "工程id") private Long projectId; - @ApiModelProperty(value="关键字") + @ApiModelProperty(value = "关键字") private String keyWord; - @ApiModelProperty(value="开始时间") + @ApiModelProperty(value = "开始时间") private String startTime; - @ApiModelProperty(value="结束时间") + @ApiModelProperty(value = "结束时间") private String endTime; - @ApiModelProperty(value="类型") + @ApiModelProperty(value = "类型") private Integer types; - @ApiModelProperty(value="协议编号") - @Excel(name = "协议号",sort = 4) + @ApiModelProperty(value = "协议编号") private String agreementCode; - @ApiModelProperty(value="领料人") - @Excel(name = "领料人",sort = 5) + @ApiModelProperty(value = "领料人") private String leasePerson; - @ApiModelProperty(value="领料人手机号") - @Excel(name = "联系电话",sort = 6) + @ApiModelProperty(value = "领料人手机号") private String leasePhone; - @ApiModelProperty(value="申请人") - @Excel(name = "申请人",sort = 7) + @ApiModelProperty(value = "申请人") private String applyFor; - @ApiModelProperty(value="任务状态") - @Excel(name = "任务状态",sort = 9) + @ApiModelProperty(value = "任务状态") + @Excel(name = "出库状态", sort = 7) private String taskName; - @ApiModelProperty(value="审批状态id") + @ApiModelProperty(value = "审批状态id") private String examineStatusId; - @ApiModelProperty(value="审批状态的备注") + @ApiModelProperty(value = "审批状态的备注") private String examineStatus; - @ApiModelProperty(value="创建时间") - @Excel(name = "申请时间",sort = 8) + @ApiModelProperty(value = "创建时间") private String createTimes; - @ApiModelProperty(value="更新时间") + @ApiModelProperty(value = "更新时间") private String updateTimes; - @ApiModelProperty(value="公司审批人") + @ApiModelProperty(value = "公司审批人") private String companyAuditBy; - @ApiModelProperty(value="公司审批时间") + @ApiModelProperty(value = "公司审批时间") private String companyAuditTime; - @ApiModelProperty(value="公司审批备注") + @ApiModelProperty(value = "公司审批备注") private String companyAuditRemark; - @ApiModelProperty(value="分管审批人") + @ApiModelProperty(value = "分管审批人") private String deptAuditBy; - @ApiModelProperty(value="分管审批时间") + @ApiModelProperty(value = "分管审批时间") private String deptAuditTime; - @ApiModelProperty(value="分管审批备注") + @ApiModelProperty(value = "分管审批备注") private String deptAuditRemark; + @ApiModelProperty(value = "领用类型:0 短期租赁 1长期领用") + private String leaseType; + private String userId; + private String typeName; + private String typeModelName; + + private String manageType; + private String typeId; + @ApiModelProperty(value = "预计领料时间(重庆)") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date estimateLeaseTime; + } \ No newline at end of file diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTaskVo.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTaskVo.java new file mode 100644 index 00000000..f33168af --- /dev/null +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/domain/TmTaskVo.java @@ -0,0 +1,217 @@ +package com.bonus.sgzb.app.domain; + +import com.bonus.sgzb.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.io.Serializable; +import java.util.Date; +import java.util.List; + +/** + * @Author:梁超 + * @date:2024/3/27 - 16:13 + */ + +@Data +public class TmTaskVo implements Serializable { + private static final long serialVersionUID = -4135112109792782142L; + + private String id; + + /** + * 任务ID + */ + @ApiModelProperty(value="任务ID") + private Long taskId; + + /** + * 任务类型(定义数据字典) + */ + @ApiModelProperty(value="任务类型(数据字典)") + private Integer taskType; + + /** + * 任务状态(定义数据字典) + */ + @ApiModelProperty(value="任务状态(数据字典)") + private Integer taskStatus; + + /** + * 预领料合计数 + */ + @ApiModelProperty(value="预领料合计数") + private int preCountNum; + + /** + * 编号 + */ + @ApiModelProperty(value="编号") + @Excel(name = "领料单号",sort = 1) + private String code; + + /** + * 创建者 + */ + @ApiModelProperty(value="创建者") + private String createBy; + + /** + * 申请人手机号码 + */ + @ApiModelProperty(value="手机号") + private String phoneNumber; + + /** + * 部门名称 单位名称 + */ + @ApiModelProperty(value="部门/单位名称") + private String deptName; + + /** + * 工程名称 + */ + @ApiModelProperty(value="工程名称") + @Excel(name = "领料工程",sort = 3) + private String proName; + + /** + * 创建时间 + */ + @ApiModelProperty(value="创建时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + /** + * 更新者 + */ + @ApiModelProperty(value="更新者") + private String updateBy; + + /** + * 更新时间 + */ + @ApiModelProperty(value="更新时间") + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + + /** + * 备注 + */ + @ApiModelProperty(value="备注") + @Excel(name = "备注",sort = 11) + private String remark; + + /** + * 数据所属组织 + */ + @ApiModelProperty(value="数据所属组织") + private Integer companyId; + + /** + * 领料任务实体 + */ + @ApiModelProperty(value="领料任务实体") + private LeaseApplyInfo leaseApplyInfo; + + /** + * 领料任务实体集合 + */ + @ApiModelProperty(value="领料任务实体集合") + private List leaseApplyInfoList; + + /** + * 领料任务详情集合 + */ + @ApiModelProperty(value="领料任务详情集合") + private List leaseApplyDetails; + + @ApiModelProperty(value="协议id") + private Integer agreementId; + + @ApiModelProperty(value="退料人") + private String backPerson; + @ApiModelProperty(value="退料人联系电话") + private String phone; + @ApiModelProperty(value="退料申请时间") + private String backTime; + @ApiModelProperty(value="退料审核人 机具分公司审批人") + private String directAuditBy; + @ApiModelProperty(value="退料审核时间 机具分公司审批时间") + private String directAuditTime; + @ApiModelProperty(value="退料审核备注 机具分公司审批备注") + private String directAuditRemark; + + @ApiModelProperty(value="往来单位id") + private Long unitId; + @ApiModelProperty(value="往来单位") + @Excel(name = "领料单位",sort = 2) + private String unitName; + + @ApiModelProperty(value="工程id") + private Long projectId; + @ApiModelProperty(value="关键字") + private String keyWord; + @ApiModelProperty(value="开始时间") + private String startTime; + @ApiModelProperty(value="结束时间") + private String endTime; + @ApiModelProperty(value="类型") + private Integer types; + + + @ApiModelProperty(value="协议编号") + @Excel(name = "协议号",sort = 4) + private String agreementCode; + + @ApiModelProperty(value="领料人") + @Excel(name = "领料人",sort = 5) + private String leasePerson; + + @ApiModelProperty(value="领料人手机号") + @Excel(name = "联系电话",sort = 6) + private String leasePhone; + + @ApiModelProperty(value="申请人") + @Excel(name = "申请人",sort = 7) + private String applyFor; + + @ApiModelProperty(value="任务状态") + @Excel(name = "任务状态",sort = 9) + private String taskName; + + @ApiModelProperty(value="审批状态id") + private String examineStatusId; + + @ApiModelProperty(value="审批状态的备注") + private String examineStatus; + + @ApiModelProperty(value="创建时间") + @Excel(name = "申请时间",sort = 8) + private String createTimes; + + @ApiModelProperty(value="更新时间") + private String updateTimes; + + @ApiModelProperty(value="公司审批人") + private String companyAuditBy; + + @ApiModelProperty(value="公司审批时间") + private String companyAuditTime; + + @ApiModelProperty(value="公司审批备注") + private String companyAuditRemark; + + @ApiModelProperty(value="分管审批人") + private String deptAuditBy; + + @ApiModelProperty(value="分管审批时间") + private String deptAuditTime; + + @ApiModelProperty(value="分管审批备注") + private String deptAuditRemark; +} diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java index 40686726..350efc8d 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/app/service/impl/TmTaskServiceImpl.java @@ -525,7 +525,7 @@ public class TmTaskServiceImpl implements TmTaskService { @Override public List getLeaseOutListByUser(TmTask task) { - return tmTaskMapper.getLeaseOutListByUser(task); + return tmTaskMapper.getLeaseOutListByUser(task); } diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml index 4a262edd..bac9a77b 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/app/TmTaskMapper.xml @@ -860,7 +860,7 @@ SELECT lad.*, mt.type_name AS typeModelName, mt1.type_name AS typeName,mt.unit_name as unitName, mt.manage_type as manageType, case WHEN mt.manage_type = '0' then '编号' else '计数' end manageTypeName, - mt.num, (lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,mm.ma_code as maCode + IFNULL(mt.num,0) AS num, (lad.pre_num - IF(lad.al_num IS NULL,'0',lad.al_num)) AS outNum,mm.ma_code as maCode FROM lease_apply_details lad LEFT JOIN ma_type mt ON lad.type_id = mt.type_id @@ -919,6 +919,18 @@ and mtk.user_id = #{userId} + + and tt.code like concat('%', #{code}, '%') + + + and bui.unit_id = #{unitId} + + + and bpl.lot_id = #{proId} + + + and tt.task_status = #{taskStatus} + GROUP BY lai.id ORDER BY tt.task_status,tt.create_time @@ -929,9 +941,11 @@ lad.parennt_id as parentId, lad.pre_num - ifnull(lad.al_num,0) as outNum, lad.pre_num as preCountNum, + lad.al_num as alNum, mt2.type_name as typeName, mt.type_name as typeModelName, mt.manage_type as manageType, + su.user_name as userName, lad.type_id as typeId FROM lease_apply_details lad @@ -939,12 +953,11 @@ LEFT JOIN ma_type mt on lad.type_id = mt.type_id LEFT JOIN ma_type mt2 on mt.parent_id = mt2.type_id LEFT JOIN ma_type_keeper mtk on lad.type_id = mtk.type_id + LEFT JOIN sys_user su on mtk.user_id = su.user_id WHERE lad.parennt_id = #{id} and mtk.user_id = #{userId} - - diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/WorkSiteDirectManageController.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/WorkSiteDirectManageController.java index 33b2cfd2..19f533f7 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/WorkSiteDirectManageController.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/controller/WorkSiteDirectManageController.java @@ -1,6 +1,8 @@ package com.bonus.sgzb.material.controller; import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.io.unit.DataUnit; import com.bonus.sgzb.base.api.domain.DirectApplyDetails; import com.bonus.sgzb.base.api.domain.DirectApplyInfo; import com.bonus.sgzb.base.api.domain.LeaseOutDetails; @@ -125,7 +127,7 @@ public class WorkSiteDirectManageController extends BaseController { if (directApplyInfo != null) { directApplyInfo.setStatus("2"); directApplyInfo.setAuditor(SecurityUtils.getLoginUser().getUsername()); - directApplyInfo.setAuditTime(new Date().toString()); + directApplyInfo.setAuditTime(DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); workSiteDirectManageService.refuseDirectApplyInfo(directApplyInfo); } else { return AjaxResult.error("参数为空,审核失败"); diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseApplyInfo.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseApplyInfo.java index 2f6bcff4..a75b6fab 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseApplyInfo.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/domain/LeaseApplyInfo.java @@ -153,5 +153,9 @@ public class LeaseApplyInfo implements Serializable { @ApiModelProperty(value="审批状态id") private String examineStatusId; + @ApiModelProperty(value="状态") + private String status; + @ApiModelProperty(value="领用类型") + private String leaseType; } \ No newline at end of file diff --git a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/WorkSiteDirectManageImpl.java b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/WorkSiteDirectManageImpl.java index 205b7167..7d7f9bd4 100644 --- a/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/WorkSiteDirectManageImpl.java +++ b/sgzb-modules/sgzb-material/src/main/java/com/bonus/sgzb/material/service/impl/WorkSiteDirectManageImpl.java @@ -1,6 +1,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; @@ -142,7 +143,8 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService { leaseApplyInfo.setTaskId(Integer.valueOf(taskId)); // 设置任务ID leaseApplyInfo.setCompanyId(leaseApplyDetailsList.get(0).getCompanyId()); // 设置设备所属分公司,用于交给哪家审核 leaseApplyInfo.setType("2"); // 设置审批层级,先固定2层,后期根据接口传入Type区分来源设定 - + leaseApplyInfo.setStatus("1"); //设置为分公司审核通过 + leaseApplyInfo.setLeaseType("0"); //设置为工程租赁 // 创建领料任务,返回领料任务编号 boolean addLeaseTaskResult = workSiteDirectManageMapper.insertSelective(leaseApplyInfo) > 0; // 领料任务创建完成,进行领料任务明细插入 @@ -579,6 +581,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService { return res; } task.setCode(lcode); + task.setTaskStatus(35); // 创建领料任务(tm_task) res = insertTmTask(task); if (res == 0) { @@ -600,7 +603,7 @@ public class WorkSiteDirectManageImpl implements WorkSiteDirectManageService { DirectApplyInfo directApplyInfos = getDirectApplyInfoById(directApplyInfoDetails.getId()); directApplyInfos.setStatus("1"); directApplyInfos.setAuditor(SecurityUtils.getLoginUser().getUsername()); - directApplyInfos.setAuditTime(new Date().toString()); + directApplyInfos.setAuditTime(DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss")); res = refuseDirectApplyInfo(directApplyInfos); } else { return res; diff --git a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/WorkSiteDirectManageMapper.xml b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/WorkSiteDirectManageMapper.xml index 03ac58af..d4f10b54 100644 --- a/sgzb-modules/sgzb-material/src/main/resources/mapper/material/WorkSiteDirectManageMapper.xml +++ b/sgzb-modules/sgzb-material/src/main/resources/mapper/material/WorkSiteDirectManageMapper.xml @@ -148,6 +148,12 @@ company_id, + + status, + + + lease_type, + @@ -201,6 +207,12 @@ #{companyId,jdbcType=INTEGER}, + + #{status,jdbcType=VARCHAR}, + + + #{leaseType,jdbcType=VARCHAR}, + @@ -400,7 +412,7 @@ and bpl.lot_id = #{lotId} - and bui.unitId = #{unitId} + and bui.unit_id = #{unitId} and dai.back_man like concat('%', #{backMan}, '%')