Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
c172a18ca9
|
|
@ -0,0 +1,356 @@
|
|||
package com.bonus.common.biz.domain.lease;
|
||||
|
||||
import com.bonus.common.biz.domain.BmFileInfo;
|
||||
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 LeaseApplyInfoExport extends BaseEntity{
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "登录用户id")
|
||||
private Long userId;
|
||||
|
||||
@ApiModelProperty(value = "登录用户部门id")
|
||||
private Long deptId;
|
||||
|
||||
@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 = "实施单位")
|
||||
@Excel(name = "实施单位")
|
||||
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 int leaseSignType;
|
||||
|
||||
/**
|
||||
* 领料物资名称汇总
|
||||
*/
|
||||
@ApiModelProperty(value = "领料物资名称汇总")
|
||||
private String maTypeNames;
|
||||
|
||||
@ApiModelProperty(value = "协议号")
|
||||
@Excel(name = "协议号")
|
||||
private String agreementCode;
|
||||
|
||||
/** 任务编号: 领料单号 */
|
||||
@ApiModelProperty(value = "领料单号")
|
||||
@Excel(name = "租赁申请单号")
|
||||
private String code;
|
||||
|
||||
/** 任务编号: 业务联系单号 */
|
||||
@ApiModelProperty(value = "业务联系单号")
|
||||
@Excel(name = "业务联系单号")
|
||||
private String businessCode;
|
||||
|
||||
/** 任务ID */
|
||||
@ApiModelProperty(value = "任务ID")
|
||||
private Long taskId;
|
||||
|
||||
/**
|
||||
* 预领料合计数
|
||||
*/
|
||||
@ApiModelProperty(value = "预领料合计数")
|
||||
@Excel(name = "申请数量")
|
||||
private BigDecimal preCountNum;
|
||||
|
||||
/** 领料人 */
|
||||
@Excel(name = "领料人")
|
||||
@ApiModelProperty(value = "领料人")
|
||||
private String leasePerson;
|
||||
|
||||
@ApiModelProperty(value = "联系方式")
|
||||
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出库完成 */
|
||||
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 = "任务所属分公司id")
|
||||
private Long taskDeptId;
|
||||
|
||||
/** 任务状态(定义数据字典) */
|
||||
@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 materialMan;
|
||||
|
||||
@ApiModelProperty(value = "材料员确认时间")
|
||||
private String confirmTime;
|
||||
|
||||
@ApiModelProperty(value = "是否确认 0不需要确认,1未确认 2已确认")
|
||||
private Integer isConfirm;
|
||||
|
||||
@ApiModelProperty(value = "材料员确认备注")
|
||||
private String confirmRemark;
|
||||
|
||||
/**
|
||||
* 工程名称
|
||||
*/
|
||||
@ApiModelProperty(value = "工程名称")
|
||||
private String projectName;
|
||||
|
||||
|
||||
@ApiModelProperty(value = "已出库数量")
|
||||
private BigDecimal alNum;
|
||||
|
||||
@ApiModelProperty(value = "开始时间")
|
||||
private String startTime;
|
||||
|
||||
@ApiModelProperty(value = "结束时间")
|
||||
private String endTime;
|
||||
|
||||
@ApiModelProperty(value = "关键字")
|
||||
private String keyWord;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
@Excel(name = "备注")
|
||||
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;
|
||||
|
||||
@ApiModelProperty(value = "有无电子签名 0 否,1 是")
|
||||
private Integer hasSign;
|
||||
|
||||
@ApiModelProperty(value = "i8工程id")
|
||||
private String externalId;
|
||||
|
||||
@ApiModelProperty(value = "签字人")
|
||||
private String signPerson;
|
||||
|
||||
@ApiModelProperty(value = "领料出库id集合")
|
||||
private String ids;
|
||||
|
||||
private Long leaseSignId;
|
||||
|
||||
private List<Long> typeIdList;
|
||||
|
||||
@ApiModelProperty(value = "一级类型id结果集")
|
||||
private String firstId;
|
||||
|
||||
@ApiModelProperty(value = "发布时间")
|
||||
private String releaseTime;
|
||||
|
||||
@ApiModelProperty(value = "查询类型")
|
||||
private String queryType;
|
||||
|
||||
@ApiModelProperty(value = "发布人id")
|
||||
private Long publisher;
|
||||
|
||||
@ApiModelProperty(value = "账号")
|
||||
private String cno;
|
||||
|
||||
/**
|
||||
* i8工程id集合
|
||||
*/
|
||||
private List<String> projectIdList;
|
||||
|
||||
private Long parentId;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
|
||||
private String leaseTime;
|
||||
}
|
||||
|
|
@ -92,6 +92,7 @@ public class MaterialBackApplyInfoServiceImpl implements MaterialBackApplyInfoSe
|
|||
if (!org.springframework.util.CollectionUtils.isEmpty(projectIdList)) {
|
||||
backApplyInfo.setProjectIdList(projectIdList);
|
||||
}
|
||||
backApplyInfo.setIdCard(null);
|
||||
}
|
||||
List<MaterialBackApplyInfo> list = materialBackInfoMapper.selectBackApplyInfoList(backApplyInfo);
|
||||
// 如果列表为空,直接返回空列表
|
||||
|
|
|
|||
|
|
@ -112,6 +112,7 @@ public class MaterialLeaseInfoServiceImpl implements MaterialLeaseInfoService {
|
|||
if (!CollectionUtils.isEmpty(projectIdList)) {
|
||||
leaseApplyInfo.setProjectIdList(projectIdList);
|
||||
}
|
||||
leaseApplyInfo.setIdCard(null);
|
||||
}
|
||||
List<MaterialLeaseApplyInfo> list = materialLeaseInfoMapper.selectLeaseApplyInfoList(leaseApplyInfo);
|
||||
// 利用Stream API进行降序排序
|
||||
|
|
|
|||
|
|
@ -327,6 +327,7 @@ public class MaterialMachineServiceImpl implements MaterialMachineService {
|
|||
for (MaterialRetainedEquipmentInfo retainedEquipmentInfo : list) {
|
||||
MaterialRetainedEquipmentInfo info = new MaterialRetainedEquipmentInfo();
|
||||
info.setTypeId(retainedEquipmentInfo.getTypeId());
|
||||
info.setTeamId(bean.getTeamId());
|
||||
List<MaterialRetainedEquipmentInfo> teamUseNumDetailsList = materialMachineMapper.getTeamUseNumDetailsList(info);
|
||||
if (CollectionUtils.isNotEmpty(teamUseNumDetailsList)) {
|
||||
retainedEquipmentInfo.setModelList(teamUseNumDetailsList);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,77 @@
|
|||
package com.bonus.material.lease.controller;
|
||||
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
import com.bonus.common.core.web.page.TableDataInfo;
|
||||
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.LeaseAgreementRecord;
|
||||
import com.bonus.material.lease.domain.LeaseAgreementSlt;
|
||||
import com.bonus.material.lease.domain.vo.LeaseApplyRequestVo;
|
||||
import com.bonus.material.lease.service.ILeaseAgreementRecordService;
|
||||
import com.bonus.material.lease.service.ILeaseAgreementSltService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目领退Controller
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Api(tags = "结算列表接口")
|
||||
@RestController
|
||||
@RequestMapping("/lease_agreement_slt")
|
||||
public class LeaseAgreementSltController extends BaseController {
|
||||
@Autowired
|
||||
private ILeaseAgreementSltService leaseAgreementSltService;
|
||||
|
||||
/**
|
||||
* 查询列表
|
||||
*/
|
||||
@ApiOperation(value = "查询列表")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(LeaseAgreementSlt leaseAgreementSlt) {
|
||||
startPage();
|
||||
List<LeaseAgreementSlt> list = leaseAgreementSltService.selectLeaseAgreementSltList(leaseAgreementSlt);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取单据详细信息
|
||||
* @param leaseAgreementSlt
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation(value = "获取单据详细信息")
|
||||
//@RequiresPermissions("lease:info:query")
|
||||
@GetMapping(value = "/getInfo")
|
||||
public AjaxResult getInfo(LeaseAgreementSlt leaseAgreementSlt) {
|
||||
return success(leaseAgreementSltService.getInfo(leaseAgreementSlt));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改数据
|
||||
*/
|
||||
@ApiOperation(value = "修改数据")
|
||||
@PreventRepeatSubmit
|
||||
//@RequiresPermissions("lease:info:edit")
|
||||
@PostMapping(value = "/updateInfo")
|
||||
public AjaxResult edit(@RequestBody @NotNull LeaseAgreementSlt leaseAgreementSlt) {
|
||||
try {
|
||||
return toAjax(leaseAgreementSltService.updateLeaseSltInfo(leaseAgreementSlt));
|
||||
} catch (Exception e) {
|
||||
return error("系统错误, " + e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,8 +3,10 @@ package com.bonus.material.lease.controller;
|
|||
import cn.hutool.core.convert.Convert;
|
||||
import com.bonus.common.biz.annotation.StoreLog;
|
||||
import com.bonus.common.biz.config.ListPagingUtil;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfoExport;
|
||||
import com.bonus.common.biz.domain.lease.LeaseOutDetails;
|
||||
import com.bonus.common.core.utils.ServletUtils;
|
||||
import com.bonus.common.core.utils.bean.BeanUtils;
|
||||
import com.bonus.common.core.utils.poi.ExcelUtil;
|
||||
import com.bonus.common.core.web.controller.BaseController;
|
||||
import com.bonus.common.core.web.domain.AjaxResult;
|
||||
|
|
@ -12,6 +14,8 @@ import com.bonus.common.log.annotation.SysLog;
|
|||
import com.bonus.common.log.enums.OperaType;
|
||||
import com.bonus.material.archives.service.ArchivesService;
|
||||
import com.bonus.material.basic.domain.BmQrcodeInfo;
|
||||
import com.bonus.material.basic.domain.ProjUsingRecord;
|
||||
import com.bonus.material.basic.domain.ProjUsingRecordExport;
|
||||
import com.bonus.material.common.annotation.PreventRepeatSubmit;
|
||||
import com.bonus.common.biz.domain.lease.LeaseApplyInfo;
|
||||
import com.bonus.material.lease.domain.LeaseApplyDetails;
|
||||
|
|
@ -27,6 +31,7 @@ import org.springframework.web.multipart.MultipartFile;
|
|||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
|
@ -144,6 +149,26 @@ public class LeaseApplyInfoController extends BaseController {
|
|||
util.exportExcel(response, list, "领料任务数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出领料出库列表
|
||||
*/
|
||||
@ApiOperation(value = "导出领料出库列表")
|
||||
@PreventRepeatSubmit
|
||||
//@RequiresPermissions("lease:info:export")
|
||||
@SysLog(title = "领料出库", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出领料出库")
|
||||
@PostMapping("/exportLeaseOutRecord")
|
||||
public void exportLeaseOutRecord(HttpServletResponse response, LeaseApplyInfo leaseApplyInfo) {
|
||||
List<LeaseApplyInfo> list = leaseApplyInfoService.selectLeaseApplyInfoList(leaseApplyInfo);
|
||||
List<LeaseApplyInfoExport> exportList = new ArrayList<>();
|
||||
for (LeaseApplyInfo leaseApplyInfo1 : list) {
|
||||
LeaseApplyInfoExport leaseApplyInfoExport = new LeaseApplyInfoExport();
|
||||
BeanUtils.copyProperties(leaseApplyInfo1, leaseApplyInfoExport);
|
||||
exportList.add(leaseApplyInfoExport);
|
||||
}
|
||||
ExcelUtil<LeaseApplyInfoExport> util = new ExcelUtil<>(LeaseApplyInfoExport.class);
|
||||
util.exportExcel(response, exportList, "领料出库数据");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取领料任务详细信息
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -0,0 +1,101 @@
|
|||
package com.bonus.material.lease.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.ToString;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 项目领退对象 lease_agreement_record
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
|
||||
|
||||
@Data
|
||||
@ToString
|
||||
public class LeaseAgreementSlt extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** ID */
|
||||
private Long id;
|
||||
|
||||
/** 协议ID */
|
||||
@Excel(name = "协议ID")
|
||||
@ApiModelProperty(value = "协议ID")
|
||||
private Long agreementId;
|
||||
|
||||
/** 机具规格ID */
|
||||
@Excel(name = "机具规格ID")
|
||||
@ApiModelProperty(value = "机具规格ID")
|
||||
private Long typeId;
|
||||
|
||||
/** 机具ID */
|
||||
@Excel(name = "机具ID")
|
||||
@ApiModelProperty(value = "机具ID")
|
||||
private Long maId;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "数量")
|
||||
@ApiModelProperty(value = "数量")
|
||||
private BigDecimal num;
|
||||
|
||||
/** 状态 */
|
||||
@Excel(name = "状态")
|
||||
@ApiModelProperty(value = "状态")
|
||||
private String status;
|
||||
|
||||
/** 领料时间 */
|
||||
@ApiModelProperty(value = "领料时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "领料时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date outTime;
|
||||
|
||||
/** 领料任务 */
|
||||
@Excel(name = "领料任务")
|
||||
@ApiModelProperty(value = "领料任务")
|
||||
private Long pickId;
|
||||
|
||||
/** 退料时间 */
|
||||
@ApiModelProperty(value = "退料时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "退料时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date backTime;
|
||||
|
||||
/** 退料任务 */
|
||||
@Excel(name = "退料任务")
|
||||
@ApiModelProperty(value = "退料任务")
|
||||
private Long backId;
|
||||
|
||||
/** 是否结算 */
|
||||
@Excel(name = "是否结算")
|
||||
@ApiModelProperty(value = "是否结算")
|
||||
private String isSlt;
|
||||
|
||||
/** 结算时间 */
|
||||
@ApiModelProperty(value = "结算时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "结算时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date sltTime;
|
||||
|
||||
/** 数据所属组织 */
|
||||
@Excel(name = "数据所属组织")
|
||||
@ApiModelProperty(value = "数据所属组织")
|
||||
private Long companyId;
|
||||
|
||||
/** 数量 */
|
||||
@Excel(name = "租赁单价")
|
||||
@ApiModelProperty(value = "租赁单价")
|
||||
private BigDecimal leasePrice;
|
||||
|
||||
/** 操作标识 */
|
||||
|
||||
@ApiModelProperty(value = "操作标识")
|
||||
private String optFlag;
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.bonus.material.lease.mapper;
|
||||
|
||||
import com.bonus.material.lease.domain.LeaseAgreementRecord;
|
||||
import com.bonus.material.lease.domain.LeaseAgreementSlt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目领退Mapper接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface LeaseAgreementSltMapper {
|
||||
|
||||
List<LeaseAgreementSlt> selectLeaseAgreementSltList(LeaseAgreementSlt leaseAgreementSlt);
|
||||
|
||||
LeaseAgreementSlt getInfo(LeaseAgreementSlt leaseAgreementSlt);
|
||||
|
||||
int updateLeaseSltInfo(LeaseAgreementSlt leaseAgreementSlt);
|
||||
|
||||
int deleteLeaseSltInfo(LeaseAgreementSlt leaseAgreementSlt);
|
||||
|
||||
int insertLeaseSltInfo(LeaseAgreementSlt leaseAgreementSlt);
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.bonus.material.lease.service;
|
||||
|
||||
import com.bonus.material.lease.domain.LeaseAgreementRecord;
|
||||
import com.bonus.material.lease.domain.LeaseAgreementSlt;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目领退Service接口
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
public interface ILeaseAgreementSltService {
|
||||
|
||||
List<LeaseAgreementSlt> selectLeaseAgreementSltList(LeaseAgreementSlt leaseAgreementSlt);
|
||||
|
||||
LeaseAgreementSlt getInfo(LeaseAgreementSlt leaseAgreementSlt);
|
||||
|
||||
int updateLeaseSltInfo(LeaseAgreementSlt leaseAgreementSlt);
|
||||
}
|
||||
|
|
@ -0,0 +1,62 @@
|
|||
package com.bonus.material.lease.service.impl;
|
||||
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.common.core.utils.DateUtils;
|
||||
import com.bonus.material.lease.domain.LeaseAgreementRecord;
|
||||
import com.bonus.material.lease.domain.LeaseAgreementSlt;
|
||||
import com.bonus.material.lease.mapper.LeaseAgreementRecordMapper;
|
||||
import com.bonus.material.lease.mapper.LeaseAgreementSltMapper;
|
||||
import com.bonus.material.lease.service.ILeaseAgreementRecordService;
|
||||
import com.bonus.material.lease.service.ILeaseAgreementSltService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 项目领退Service业务层处理
|
||||
*
|
||||
* @author xsheng
|
||||
* @date 2024-10-16
|
||||
*/
|
||||
@Service
|
||||
public class LeaseAgreementSltServiceImpl implements ILeaseAgreementSltService {
|
||||
@Autowired
|
||||
private LeaseAgreementSltMapper leaseAgreementSltMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public List<LeaseAgreementSlt> selectLeaseAgreementSltList(LeaseAgreementSlt leaseAgreementSlt) {
|
||||
return leaseAgreementSltMapper.selectLeaseAgreementSltList(leaseAgreementSlt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LeaseAgreementSlt getInfo(LeaseAgreementSlt leaseAgreementSlt) {
|
||||
return leaseAgreementSltMapper.getInfo(leaseAgreementSlt);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateLeaseSltInfo(LeaseAgreementSlt leaseAgreementSlt) {
|
||||
try {
|
||||
String optFlag = leaseAgreementSlt.getOptFlag();
|
||||
if ("update".equals(optFlag)) {
|
||||
leaseAgreementSlt.setUpdateTime(DateUtils.getNowDate());
|
||||
return leaseAgreementSltMapper.updateLeaseSltInfo(leaseAgreementSlt);
|
||||
}
|
||||
if ("delete".equals(optFlag)) {
|
||||
leaseAgreementSlt.setUpdateTime(DateUtils.getNowDate());
|
||||
return leaseAgreementSltMapper.deleteLeaseSltInfo(leaseAgreementSlt);
|
||||
}
|
||||
if ("insert".equals(optFlag)) {
|
||||
leaseAgreementSlt.setCreateTime(DateUtils.getNowDate());
|
||||
return leaseAgreementSltMapper.insertLeaseSltInfo(leaseAgreementSlt);
|
||||
|
||||
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("系统错误, " + e.getMessage());
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -390,7 +390,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
if (null == bean.getLeasePrice() || bean.getLeasePrice().compareTo(BigDecimal.ZERO) < 0) {
|
||||
bean.setLeasePrice(BigDecimal.ZERO);
|
||||
} else {
|
||||
bean.setLeasePrice(bean.getLeasePrice().setScale(2, RoundingMode.HALF_UP));
|
||||
bean.setLeasePrice(bean.getLeasePrice().setScale(3, RoundingMode.DOWN));
|
||||
}
|
||||
if (null == bean.getNum() || bean.getNum().compareTo(BigDecimal.ZERO) < 0) {
|
||||
bean.setNum(BigDecimal.ZERO);
|
||||
|
|
@ -404,7 +404,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
if (leaseDays.compareTo(BigDecimal.ZERO) < 0) {
|
||||
leaseDays = BigDecimal.ZERO;
|
||||
}
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays).setScale(GlobalConstants.INT_2, RoundingMode.HALF_UP);
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays).setScale(GlobalConstants.INT_2, RoundingMode.DOWN);
|
||||
bean.setCosts(costs);
|
||||
}
|
||||
return leaseList;
|
||||
|
|
@ -424,7 +424,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
if (null == bean.getLeasePrice() || bean.getLeasePrice().compareTo(BigDecimal.ZERO) < 0) {
|
||||
bean.setLeasePrice(BigDecimal.ZERO);
|
||||
} else {
|
||||
bean.setLeasePrice(bean.getLeasePrice().setScale(2, RoundingMode.HALF_UP));
|
||||
bean.setLeasePrice(bean.getLeasePrice().setScale(3, RoundingMode.DOWN));
|
||||
}
|
||||
if (null == bean.getNum() || bean.getNum().compareTo(BigDecimal.ZERO) < 0) {
|
||||
bean.setNum(BigDecimal.ZERO);
|
||||
|
|
@ -438,7 +438,7 @@ public class SltAgreementInfoServiceImpl implements ISltAgreementInfoService {
|
|||
if (leaseDays.compareTo(BigDecimal.ZERO) < 0) {
|
||||
leaseDays = BigDecimal.ZERO;
|
||||
}
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays).setScale(GlobalConstants.INT_2, RoundingMode.HALF_UP);
|
||||
BigDecimal costs = leasePrice.multiply(num).multiply(leaseDays).setScale(GlobalConstants.INT_2, RoundingMode.DOWN);
|
||||
bean.setCosts(costs);
|
||||
}
|
||||
return leaseList;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,6 @@ import com.bonus.common.biz.constant.BmConfigItems;
|
|||
import com.bonus.common.biz.enums.PurchaseTaskStatusEnum;
|
||||
import com.bonus.common.biz.enums.RepairInputStatusEnum;
|
||||
import com.bonus.common.biz.enums.TmTaskTypeEnum;
|
||||
import com.bonus.common.core.utils.StringUtils;
|
||||
import com.bonus.common.core.utils.sms.SmsUtils;
|
||||
import com.bonus.material.task.domain.TmTask;
|
||||
import com.bonus.material.task.service.ITmTaskService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,140 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.bonus.material.lease.mapper.LeaseAgreementSltMapper">
|
||||
<resultMap type="com.bonus.material.lease.domain.LeaseAgreementSlt" id="LeaseAgreementRecordResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="agreementId" column="agreement_id" />
|
||||
<result property="typeId" column="type_id" />
|
||||
<result property="maId" column="ma_id" />
|
||||
<result property="num" column="num" />
|
||||
<result property="status" column="status" />
|
||||
<result property="outTime" column="out_time" />
|
||||
<result property="pickId" column="pick_id" />
|
||||
<result property="backTime" column="back_time" />
|
||||
<result property="backId" column="back_id" />
|
||||
<result property="isSlt" column="is_slt" />
|
||||
<result property="sltTime" column="slt_time" />
|
||||
<result property="companyId" column="company_id" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="selectLeaseAgreementSltList" resultType="com.bonus.material.lease.domain.LeaseAgreementSlt">
|
||||
SELECT
|
||||
sai.id as id,
|
||||
sai.agreement_id as agreementId,
|
||||
sai.type_id as typeId,
|
||||
sai.ma_id as maId,
|
||||
sai.num as num,
|
||||
sai.start_time as outTime,
|
||||
sai.end_time as backTime,
|
||||
sai.`status` as status,
|
||||
sai.lease_id as pickId,
|
||||
sai.back_id as backId,
|
||||
sai.lease_price as leasePrice,
|
||||
sai.is_slt as isSlt,
|
||||
sai.slt_time as sltTime
|
||||
FROM
|
||||
slt_agreement_info sai
|
||||
where 1=1
|
||||
<if test="agreementId != null and agreementId != ''">
|
||||
and sai.agreement_id = #{agreementId}
|
||||
</if>
|
||||
<if test="typeId != null and typeId != ''">
|
||||
and sai.type_id = #{typeId}
|
||||
</if>
|
||||
<if test="maId != null and maId != ''">
|
||||
and sai.ma_id = #{maId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getInfo" resultType="com.bonus.material.lease.domain.LeaseAgreementSlt">
|
||||
SELECT
|
||||
sai.id as id,
|
||||
sai.agreement_id as agreementId,
|
||||
sai.type_id as typeId,
|
||||
sai.ma_id as maId,
|
||||
sai.num as num,
|
||||
sai.start_time as outTime,
|
||||
sai.end_time as backTime,
|
||||
sai.`status` as status,
|
||||
sai.lease_id as pickId,
|
||||
sai.back_id as backId,
|
||||
sai.lease_price as leasePrice,
|
||||
sai.is_slt as isSlt,
|
||||
sai.slt_time as sltTime
|
||||
FROM
|
||||
slt_agreement_info sai
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<update id="updateLeaseSltInfo">
|
||||
update slt_agreement_info
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="agreementId != null">agreement_id = #{agreementId},</if>
|
||||
<if test="typeId != null">type_id = #{typeId},</if>
|
||||
<if test="maId != null">ma_id = #{maId},</if>
|
||||
<if test="num != null">num = #{num},</if>
|
||||
<if test="status != null">status = #{status},</if>
|
||||
<if test="outTime != null">start_time = #{outTime},</if>
|
||||
<if test="pickId != null">lease_id = #{pickId},</if>
|
||||
<if test="backTime != null">end_time = #{backTime},</if>
|
||||
<if test="backId != null">back_id = #{backId},</if>
|
||||
<if test="isSlt != null">is_slt = #{isSlt},</if>
|
||||
<if test="leasePrice != null">lease_price = #{leasePrice},</if>
|
||||
<if test="sltTime != null">slt_time = #{sltTime},</if>
|
||||
<if test="companyId != null">company_id = #{companyId},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteLeaseSltInfo">
|
||||
delete from slt_agreement_info where id = #{id}
|
||||
</delete>
|
||||
|
||||
<insert id="insertLeaseSltInfo">
|
||||
|
||||
insert into slt_agreement_info
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="agreementId != null">agreement_id,</if>
|
||||
<if test="typeId != null">type_id,</if>
|
||||
<if test="maId != null">ma_id,</if>
|
||||
<if test="num != null">num,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="outTime != null">start_time,</if>
|
||||
<if test="pickId != null">lease_id,</if>
|
||||
<if test="backTime != null">end_time,</if>
|
||||
<if test="backId != null">back_id,</if>
|
||||
<if test="isSlt != null">is_slt,</if>
|
||||
<if test="leasePrice != null">lease_price,</if>
|
||||
<if test="sltTime != null">slt_time,</if>
|
||||
<if test="companyId != null">company_id,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="agreementId != null">#{agreementId},</if>
|
||||
<if test="typeId != null">#{typeId},</if>
|
||||
<if test="maId != null">#{maId},</if>
|
||||
<if test="num != null">#{num},</if>
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="outTime != null">#{outTime},</if>
|
||||
<if test="pickId != null">#{pickId},</if>
|
||||
<if test="backTime != null">#{backTime},</if>
|
||||
<if test="backId != null">#{backId},</if>
|
||||
<if test="isSlt != null">#{isSlt},</if>
|
||||
<if test="leasePrice != null">#{leasePrice},</if>
|
||||
<if test="sltTime != null">#{sltTime},</if>
|
||||
<if test="companyId != null">#{companyId},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
</mapper>
|
||||
Loading…
Reference in New Issue