Merge branch 'master' of http://14.103.246.124:16000/bonus/Bonus-Cloud-Material
This commit is contained in:
commit
451f542982
|
|
@ -35,4 +35,6 @@ public class RepairDetails {
|
||||||
@Excel(name = "维修时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
@Excel(name = "维修时间", width = 20, dateFormat = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date repairTime;
|
private Date repairTime;
|
||||||
|
|
||||||
|
private String nickName;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -93,4 +93,6 @@ public class RepairInfo {
|
||||||
|
|
||||||
@ApiModelProperty(value = "用户id")
|
@ApiModelProperty(value = "用户id")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
|
private String nickName;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,4 +117,11 @@ public interface BmReportMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<ScrapDetailsInfo> getScrapDetailsList(ScrapInfo bean);
|
List<ScrapDetailsInfo> getScrapDetailsList(ScrapInfo bean);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询维修人名称
|
||||||
|
* @param repairPersonName
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
String selectUserNameById(String repairPersonName);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ import com.bonus.material.basic.domain.report.*;
|
||||||
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
import com.bonus.material.basic.mapper.BmFileInfoMapper;
|
||||||
import com.bonus.material.basic.mapper.BmReportMapper;
|
import com.bonus.material.basic.mapper.BmReportMapper;
|
||||||
import com.bonus.material.basic.service.BmReportService;
|
import com.bonus.material.basic.service.BmReportService;
|
||||||
|
import org.hibernate.validator.internal.util.StringHelper;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
@ -227,6 +228,9 @@ public class BmReportServiceImpl implements BmReportService {
|
||||||
List<RepairInfo> list = bmReportMapper.getRepairList(bean);
|
List<RepairInfo> list = bmReportMapper.getRepairList(bean);
|
||||||
if (CollectionUtils.isNotEmpty(list)) {
|
if (CollectionUtils.isNotEmpty(list)) {
|
||||||
for (RepairInfo repairInfo : list) {
|
for (RepairInfo repairInfo : list) {
|
||||||
|
if (!StringHelper.isNullOrEmptyString(repairInfo.getNickName())){
|
||||||
|
repairInfo.setRepairPersonName(repairInfo.getNickName());
|
||||||
|
}
|
||||||
totalBackNum = totalBackNum.add(repairInfo.getBackNum());
|
totalBackNum = totalBackNum.add(repairInfo.getBackNum());
|
||||||
totalRepairedNum = totalRepairedNum.add(repairInfo.getRepairedNum());
|
totalRepairedNum = totalRepairedNum.add(repairInfo.getRepairedNum());
|
||||||
totalPendingScrapNum = totalPendingScrapNum.add(repairInfo.getPendingScrapNum());
|
totalPendingScrapNum = totalPendingScrapNum.add(repairInfo.getPendingScrapNum());
|
||||||
|
|
@ -252,7 +256,16 @@ public class BmReportServiceImpl implements BmReportService {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<RepairDetails> getRepairDetailsList(RepairInfo bean) {
|
public List<RepairDetails> getRepairDetailsList(RepairInfo bean) {
|
||||||
return bmReportMapper.getRepairDetailsList(bean);
|
List<RepairDetails> list = bmReportMapper.getRepairDetailsList(bean);
|
||||||
|
if (list.size()>0){
|
||||||
|
//处理数据库中维修人字段既有Id也有人员的问题
|
||||||
|
for (RepairDetails repairDetails : list){
|
||||||
|
if (!StringHelper.isNullOrEmptyString(repairDetails.getNickName())){
|
||||||
|
repairDetails.setRepairPersonName(repairDetails.getNickName());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -372,4 +385,19 @@ public class BmReportServiceImpl implements BmReportService {
|
||||||
public List<ScrapDetailsInfo> getScrapDetailsList(ScrapInfo bean) {
|
public List<ScrapDetailsInfo> getScrapDetailsList(ScrapInfo bean) {
|
||||||
return bmReportMapper.getScrapDetailsList(bean);
|
return bmReportMapper.getScrapDetailsList(bean);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断字符串是否为纯数字(可用于判断是否为用户ID)
|
||||||
|
*/
|
||||||
|
private boolean isNumeric(String str) {
|
||||||
|
if (str == null || str.isEmpty()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
for (char c : str.toCharArray()) {
|
||||||
|
if (!Character.isDigit(c)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -162,6 +162,7 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
||||||
OutRecordInfo recordInfo = new OutRecordInfo();
|
OutRecordInfo recordInfo = new OutRecordInfo();
|
||||||
BeanUtils.copyProperties(outRecordInfo, recordInfo);
|
BeanUtils.copyProperties(outRecordInfo, recordInfo);
|
||||||
recordInfo.setMaCode(code);
|
recordInfo.setMaCode(code);
|
||||||
|
recordInfo.setOutNum(BigDecimal.ONE);
|
||||||
list.add(recordInfo);
|
list.add(recordInfo);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -386,7 +387,8 @@ public class ComplexQueryServiceImpl implements ComplexQueryService {
|
||||||
// 批量查询并缓存结果,减少数据库交互
|
// 批量查询并缓存结果,减少数据库交互
|
||||||
Map<Long, UseStorageInfo> leaseInfoMap = Collections.emptyMap();
|
Map<Long, UseStorageInfo> leaseInfoMap = Collections.emptyMap();
|
||||||
if (!leaseIds.isEmpty()) {
|
if (!leaseIds.isEmpty()) {
|
||||||
leaseInfoMap = complexQueryMapper.batchSelectInfo(leaseIds).stream()
|
List<UseStorageInfo> queryResults = complexQueryMapper.batchSelectInfo(leaseIds);
|
||||||
|
leaseInfoMap = queryResults.stream()
|
||||||
// 先过滤掉null元素,避免后续调用方法时空指针
|
// 先过滤掉null元素,避免后续调用方法时空指针
|
||||||
.filter(Objects::nonNull)
|
.filter(Objects::nonNull)
|
||||||
// 再过滤LeaseId为null的元素
|
// 再过滤LeaseId为null的元素
|
||||||
|
|
|
||||||
|
|
@ -291,4 +291,11 @@ public interface LeaseTaskMapper {
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
int updateLeaseOutNumNew(LeaseApplyDetails leaseApplyDetails);
|
int updateLeaseOutNumNew(LeaseApplyDetails leaseApplyDetails);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 领用申请详情修改 -- 减少领用数量
|
||||||
|
* @param bean
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
int insertBackRecordByMaId(LeaseApplyDetails bean);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,7 @@ import org.springframework.util.CollectionUtils;
|
||||||
import org.springframework.web.util.UriComponentsBuilder;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
@ -1205,14 +1206,51 @@ public class LeaseTaskServiceImpl implements ILeaseTaskService {
|
||||||
if (res == GlobalConstants.INT_0) {
|
if (res == GlobalConstants.INT_0) {
|
||||||
throw new RuntimeException("出库失败,插入结算记录失败");
|
throw new RuntimeException("出库失败,插入结算记录失败");
|
||||||
}
|
}
|
||||||
return AjaxResult.success("领用出库驳回成功");
|
|
||||||
|
//增加退回记录
|
||||||
|
insertBackRecord(leaseApplyDetails);
|
||||||
|
return AjaxResult.success("领用出库退回成功");
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
|
||||||
log.error("领用出库驳回失败:",e.getMessage());
|
log.error("领用出库退回失败:",e.getMessage());
|
||||||
return AjaxResult.error("领用出库驳回失败");
|
return AjaxResult.error("领用出库退回失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 添加退回记录
|
||||||
|
* @param leaseApplyDetails
|
||||||
|
*/
|
||||||
|
public void insertBackRecord(LeaseApplyDetails leaseApplyDetails) {
|
||||||
|
// 查询当前登陆用户信息
|
||||||
|
Long theLoginUserId = SecurityUtils.getLoginUser().getSysUser().getUserId();
|
||||||
|
LeaseApplyDetails bean = new LeaseApplyDetails();
|
||||||
|
//判断是编码还是数量
|
||||||
|
if (leaseApplyDetails.getMaCodeVoList()!=null){
|
||||||
|
//编码
|
||||||
|
for (MaCodeVo maCodeVo : leaseApplyDetails.getMaCodeVoList()) {
|
||||||
|
//添加退回记录
|
||||||
|
bean.setMaId(maCodeVo.getMaId());
|
||||||
|
bean.setParentId(leaseApplyDetails.getParentId());
|
||||||
|
bean.setTypeId(leaseApplyDetails.getTypeId());
|
||||||
|
bean.setNewTypeId(leaseApplyDetails.getNewTypeId());
|
||||||
|
bean.setNum(BigDecimal.valueOf(1));
|
||||||
|
bean.setCreateBy(String.valueOf(theLoginUserId));
|
||||||
|
int res = mapper.insertBackRecordByMaId(bean);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//数量
|
||||||
|
bean.setParentId(leaseApplyDetails.getParentId());
|
||||||
|
bean.setTypeId(leaseApplyDetails.getTypeId());
|
||||||
|
bean.setNewTypeId(leaseApplyDetails.getNewTypeId());
|
||||||
|
bean.setNum(leaseApplyDetails.getAlNum());
|
||||||
|
bean.setCreateBy(String.valueOf(theLoginUserId));
|
||||||
|
bean.setNum(leaseApplyDetails.getNum());
|
||||||
|
int res = mapper.insertBackRecordByMaId(bean);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除结算记录
|
* 删除结算记录
|
||||||
* @param leaseApplyDetails
|
* @param leaseApplyDetails
|
||||||
|
|
|
||||||
|
|
@ -403,7 +403,11 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
if (signedOrgSet.size() == 1) {
|
if (signedOrgSet.size() == 1) {
|
||||||
purchaseCheckInfo.setSignLevel("2");
|
purchaseCheckInfo.setSignLevel("2");
|
||||||
} else {
|
} else {
|
||||||
purchaseCheckInfo.setSignLevel("3");
|
// 获取purchaseSignRecordList中是否存在auditStatus为2,即被驳回的数据
|
||||||
|
boolean isRejected = purchaseSignRecordList.stream().anyMatch(item -> "2".equals(item.getAuditStatus()));
|
||||||
|
if (!isRejected) {
|
||||||
|
purchaseCheckInfo.setSignLevel("3");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -841,22 +845,25 @@ public class PurchaseCheckInfoServiceImpl implements IPurchaseCheckInfoService {
|
||||||
extractedFile(details);
|
extractedFile(details);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 验收驳回处理流程
|
if (!CollectionUtils.isEmpty(purchaseVerifyVo.getPurchaseCheckDetailsList())) {
|
||||||
for (PurchaseCheckDetails details : purchaseVerifyVo.getPurchaseCheckDetailsList()) {
|
// 验收驳回处理流程
|
||||||
details.setStatus(PurchaseTaskStatusEnum.TO_CHECK_AFTER_REJECT.getStatus());
|
for (PurchaseCheckDetails details : purchaseVerifyVo.getPurchaseCheckDetailsList()) {
|
||||||
int res = purchaseCheckDetailsMapper.updatePurchaseDetails4Check(details);
|
details.setStatus(PurchaseTaskStatusEnum.TO_CHECK_AFTER_REJECT.getStatus());
|
||||||
if (res < 1) {
|
int res = purchaseCheckDetailsMapper.updatePurchaseDetails4Check(details);
|
||||||
return AjaxResult.error("验收驳回失败,请联系管理员");
|
if (res < 1) {
|
||||||
|
return AjaxResult.error("验收驳回失败,请联系管理员");
|
||||||
|
}
|
||||||
|
extractedFile(details);
|
||||||
}
|
}
|
||||||
extractedFile(details);
|
PurchaseCheckDetails purchaseCheckDetails = purchaseVerifyVo.getPurchaseCheckDetailsList().get(0);
|
||||||
PurchaseSignRecord purchaseSignRecord = new PurchaseSignRecord();
|
PurchaseSignRecord purchaseSignRecord = new PurchaseSignRecord();
|
||||||
purchaseSignRecord.setTaskId(details.getTaskId());
|
purchaseSignRecord.setTaskId(purchaseCheckDetails.getTaskId());
|
||||||
purchaseSignRecord.setUserId(SecurityUtils.getLoginUser().getUserid());
|
purchaseSignRecord.setUserId(SecurityUtils.getLoginUser().getUserid());
|
||||||
purchaseSignRecord.setOrgId(loginUserDeptId);
|
purchaseSignRecord.setOrgId(loginUserDeptId);
|
||||||
// 审核驳回
|
// 审核驳回
|
||||||
purchaseSignRecord.setAuditStatus("2");
|
purchaseSignRecord.setAuditStatus("2");
|
||||||
purchaseSignRecord.setCreateTime(DateUtils.getNowDate());
|
purchaseSignRecord.setCreateTime(DateUtils.getNowDate());
|
||||||
purchaseSignRecord.setAuditRemark(details.getCheckResult());
|
purchaseSignRecord.setAuditRemark(purchaseCheckDetails.getCheckResult());
|
||||||
int addPurchaseSignResult = signProcessMapper.insertPurchaseSignRecord(purchaseSignRecord);
|
int addPurchaseSignResult = signProcessMapper.insertPurchaseSignRecord(purchaseSignRecord);
|
||||||
if (addPurchaseSignResult < 1) {
|
if (addPurchaseSignResult < 1) {
|
||||||
return AjaxResult.error("会签失败,purchase_audit_record表插入0条数据");
|
return AjaxResult.error("会签失败,purchase_audit_record表插入0条数据");
|
||||||
|
|
|
||||||
|
|
@ -23,15 +23,21 @@ import lombok.experimental.Accessors;
|
||||||
public class RepairPartDetails extends BaseEntity {
|
public class RepairPartDetails extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
/** ID */
|
/**
|
||||||
|
* ID
|
||||||
|
*/
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/** 任务ID */
|
/**
|
||||||
|
* 任务ID
|
||||||
|
*/
|
||||||
@Excel(name = "任务ID")
|
@Excel(name = "任务ID")
|
||||||
@ApiModelProperty(value = "任务ID")
|
@ApiModelProperty(value = "任务ID")
|
||||||
private Long taskId;
|
private Long taskId;
|
||||||
|
|
||||||
/** 机具ID */
|
/**
|
||||||
|
* 机具ID
|
||||||
|
*/
|
||||||
@Excel(name = "机具ID")
|
@Excel(name = "机具ID")
|
||||||
@ApiModelProperty(value = "机具ID")
|
@ApiModelProperty(value = "机具ID")
|
||||||
private Long maId;
|
private Long maId;
|
||||||
|
|
@ -39,7 +45,9 @@ public class RepairPartDetails extends BaseEntity {
|
||||||
@ApiModelProperty(value = "机具编码")
|
@ApiModelProperty(value = "机具编码")
|
||||||
private String maCode;
|
private String maCode;
|
||||||
|
|
||||||
/** 规格ID */
|
/**
|
||||||
|
* 规格ID
|
||||||
|
*/
|
||||||
@Excel(name = "规格ID")
|
@Excel(name = "规格ID")
|
||||||
@ApiModelProperty(value = "规格ID")
|
@ApiModelProperty(value = "规格ID")
|
||||||
private Long typeId;
|
private Long typeId;
|
||||||
|
|
@ -50,12 +58,16 @@ public class RepairPartDetails extends BaseEntity {
|
||||||
@ApiModelProperty(value = "规格型号")
|
@ApiModelProperty(value = "规格型号")
|
||||||
private String typeModelName;
|
private String typeModelName;
|
||||||
|
|
||||||
/** 配件ID */
|
/**
|
||||||
|
* 配件ID
|
||||||
|
*/
|
||||||
@Excel(name = "配件ID")
|
@Excel(name = "配件ID")
|
||||||
@ApiModelProperty(value = "配件ID")
|
@ApiModelProperty(value = "配件ID")
|
||||||
private Long partId;
|
private Long partId;
|
||||||
|
|
||||||
/** 配件数量 */
|
/**
|
||||||
|
* 配件数量
|
||||||
|
*/
|
||||||
@Excel(name = "配件数量")
|
@Excel(name = "配件数量")
|
||||||
@ApiModelProperty(value = "配件数量")
|
@ApiModelProperty(value = "配件数量")
|
||||||
private Integer partNum;
|
private Integer partNum;
|
||||||
|
|
@ -63,7 +75,9 @@ public class RepairPartDetails extends BaseEntity {
|
||||||
@ApiModelProperty(value = "配件库存数量")
|
@ApiModelProperty(value = "配件库存数量")
|
||||||
private Integer storageNum;
|
private Integer storageNum;
|
||||||
|
|
||||||
/** 配件费用 */
|
/**
|
||||||
|
* 配件费用
|
||||||
|
*/
|
||||||
@Excel(name = "配件费用")
|
@Excel(name = "配件费用")
|
||||||
@ApiModelProperty(value = "配件费用")
|
@ApiModelProperty(value = "配件费用")
|
||||||
private BigDecimal partCost;
|
private BigDecimal partCost;
|
||||||
|
|
@ -71,44 +85,64 @@ public class RepairPartDetails extends BaseEntity {
|
||||||
@ApiModelProperty(value = "配件费用")
|
@ApiModelProperty(value = "配件费用")
|
||||||
private BigDecimal backCost;
|
private BigDecimal backCost;
|
||||||
|
|
||||||
/** 类型(0不收费,1收费) */
|
/**
|
||||||
|
* 类型(0不收费,1收费)
|
||||||
|
*/
|
||||||
@Excel(name = "类型", readConverterExp = "0=不收费,1收费")
|
@Excel(name = "类型", readConverterExp = "0=不收费,1收费")
|
||||||
private Integer partType;
|
private Integer partType;
|
||||||
|
|
||||||
/** 数据所属组织 */
|
/**
|
||||||
|
* 数据所属组织
|
||||||
|
*/
|
||||||
@Excel(name = "数据所属组织")
|
@Excel(name = "数据所属组织")
|
||||||
@ApiModelProperty(value = "数据所属组织")
|
@ApiModelProperty(value = "数据所属组织")
|
||||||
private Long companyId;
|
private Long companyId;
|
||||||
|
|
||||||
/** 维修内容 */
|
/**
|
||||||
|
* 维修内容
|
||||||
|
*/
|
||||||
@Excel(name = "维修内容")
|
@Excel(name = "维修内容")
|
||||||
@ApiModelProperty(value = "维修内容")
|
@ApiModelProperty(value = "维修内容")
|
||||||
private String repairContent;
|
private String repairContent;
|
||||||
|
|
||||||
/** 维修数量 */
|
/**
|
||||||
|
* 维修数量
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "维修数量")
|
@ApiModelProperty(value = "维修数量")
|
||||||
private BigDecimal repairNum;
|
private BigDecimal repairNum;
|
||||||
|
|
||||||
/** 报废数量 */
|
/**
|
||||||
|
* 报废数量
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "报废数量")
|
@ApiModelProperty(value = "报废数量")
|
||||||
private BigDecimal scrapNum;
|
private BigDecimal scrapNum;
|
||||||
|
|
||||||
/** 报废原因id */
|
/**
|
||||||
|
* 报废原因id
|
||||||
|
*/
|
||||||
private Long scrapId;
|
private Long scrapId;
|
||||||
|
|
||||||
/** 报废原因 */
|
/**
|
||||||
|
* 报废原因
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "报废原因")
|
@ApiModelProperty(value = "报废原因")
|
||||||
private String scrapReason;
|
private String scrapReason;
|
||||||
|
|
||||||
/** 报废原因类型(0:自然损坏,1人为损坏) */
|
/**
|
||||||
|
* 报废原因类型(0:自然损坏,1人为损坏)
|
||||||
|
*/
|
||||||
@Excel(name = "损坏原因类型", readConverterExp = "0=:自然损坏,1人为损坏")
|
@Excel(name = "损坏原因类型", readConverterExp = "0=:自然损坏,1人为损坏")
|
||||||
private String scrapType;
|
private String scrapType;
|
||||||
|
|
||||||
/** 附件集合 */
|
/**
|
||||||
|
* 附件集合
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "附件集合")
|
@ApiModelProperty(value = "附件集合")
|
||||||
private List<BmFileInfo> fileList;
|
private List<BmFileInfo> fileList;
|
||||||
|
|
||||||
/** 维修人员 */
|
/**
|
||||||
|
* 维修人员
|
||||||
|
*/
|
||||||
@ApiModelProperty(value = "维修人")
|
@ApiModelProperty(value = "维修人")
|
||||||
private String repairer;
|
private String repairer;
|
||||||
|
|
||||||
|
|
@ -130,4 +164,6 @@ public class RepairPartDetails extends BaseEntity {
|
||||||
* 状态
|
* 状态
|
||||||
*/
|
*/
|
||||||
private String status;
|
private String status;
|
||||||
|
|
||||||
|
private String keyWord;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -42,11 +42,11 @@ public class UseMaintenanceWarningController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询检修过期列表
|
* 查询安全工器具检修过期列表
|
||||||
* @param bean
|
* @param bean
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "查询检修过期列表")
|
@ApiOperation(value = "查询安全工器具检修过期列表")
|
||||||
@GetMapping("/getOverTimeList")
|
@GetMapping("/getOverTimeList")
|
||||||
public TableDataInfo getOverTimeList(UseMaintenanceWarningBean bean)
|
public TableDataInfo getOverTimeList(UseMaintenanceWarningBean bean)
|
||||||
{
|
{
|
||||||
|
|
@ -56,19 +56,19 @@ public class UseMaintenanceWarningController extends BaseController
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出检修过期列表
|
* 导出安全工器具检修过期列表
|
||||||
* @param response
|
* @param response
|
||||||
* @param bean
|
* @param bean
|
||||||
*/
|
*/
|
||||||
@ApiOperation(value = "导出检修过期列表")
|
@ApiOperation(value = "导出安全工器具检修过期列表")
|
||||||
@PreventRepeatSubmit
|
@PreventRepeatSubmit
|
||||||
@SysLog(title = "检修预警", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出检修过期列表")
|
@SysLog(title = "检修预警", businessType = OperaType.EXPORT, logType = 1,module = "仓储管理->导出安全工器具检修过期列表")
|
||||||
@PostMapping("/exportOverTimeList")
|
@PostMapping("/exportOverTimeList")
|
||||||
public void exportOverTimeList(HttpServletResponse response, UseMaintenanceWarningBean bean)
|
public void exportOverTimeList(HttpServletResponse response, UseMaintenanceWarningBean bean)
|
||||||
{
|
{
|
||||||
List<UseMaintenanceWarningBean> list = service.getOverTimeListList(bean);
|
List<UseMaintenanceWarningBean> list = service.getOverTimeListList(bean);
|
||||||
ExcelUtil<UseMaintenanceWarningBean> util = new ExcelUtil<UseMaintenanceWarningBean>(UseMaintenanceWarningBean.class);
|
ExcelUtil<UseMaintenanceWarningBean> util = new ExcelUtil<UseMaintenanceWarningBean>(UseMaintenanceWarningBean.class);
|
||||||
util.exportExcel(response, list, "检修过期数据");
|
util.exportExcel(response, list, "安全工器具检修过期列表");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ public interface UseMaintenanceWarningMapper
|
||||||
List<UseMaintenanceWarningBean> getUserManger(UseMaintenanceWarningBean bean);
|
List<UseMaintenanceWarningBean> getUserManger(UseMaintenanceWarningBean bean);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询检修过期列表
|
* 查询安全工器具检修过期列表
|
||||||
* @param bean
|
* @param bean
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public interface UseMaintenanceWarningService
|
||||||
public List<UseMaintenanceWarningBean> getList(UseMaintenanceWarningBean bean);
|
public List<UseMaintenanceWarningBean> getList(UseMaintenanceWarningBean bean);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询检修过期列表
|
* 查询安全工器具检修过期列表
|
||||||
* @param bean
|
* @param bean
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -38,7 +38,7 @@ public class UseMaintenanceWarningServiceImpl implements UseMaintenanceWarningSe
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询检修过期列表
|
* 查询安全工器具检修过期列表
|
||||||
* @param bean
|
* @param bean
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -228,7 +228,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
|
LEFT JOIN bm_agreement_info bai ON tta.agreement_id = bai.agreement_id
|
||||||
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id
|
LEFT JOIN bm_unit bu ON bai.unit_id = bu.unit_id
|
||||||
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
LEFT JOIN bm_project bp ON bai.project_id = bp.pro_id
|
||||||
LEFT JOIN ( SELECT parent_id, type_id, GROUP_CONCAT( DISTINCT create_by ) AS createBy, MAX( create_time ) AS createTime FROM lease_out_details GROUP BY parent_id, type_id ) a ON a.parent_id = lad.parent_id
|
LEFT JOIN ( SELECT lod.parent_id, lod.type_id, GROUP_CONCAT( DISTINCT su.nick_name ) AS createBy, MAX( lod.create_time ) AS createTime FROM lease_out_details lod
|
||||||
|
LEFT JOIN sys_user su ON lod.create_by = su.user_id GROUP BY parent_id, type_id ) a ON a.parent_id = lad.parent_id
|
||||||
AND a.type_id = lad.type_id
|
AND a.type_id = lad.type_id
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
|
|
@ -355,6 +356,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
bu.unit_name as leaseUnitName,
|
bu.unit_name as leaseUnitName,
|
||||||
bp.pro_name as leaseProjectName,
|
bp.pro_name as leaseProjectName,
|
||||||
rad.repairer as repairPersonName,
|
rad.repairer as repairPersonName,
|
||||||
|
u.nick_name as nickName,
|
||||||
tt.`code` as code,
|
tt.`code` as code,
|
||||||
rad.task_id as taskId,
|
rad.task_id as taskId,
|
||||||
rad.type_id as typeId,
|
rad.type_id as typeId,
|
||||||
|
|
@ -376,6 +378,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
LEFT JOIN ma_type mt3 ON mt3.type_id = mt2.parent_id
|
||||||
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
LEFT JOIN ma_type mt4 ON mt4.type_id = mt3.parent_id
|
||||||
LEFT JOIN ma_type_manage mtm ON mt4.type_id = mtm.type_id
|
LEFT JOIN ma_type_manage mtm ON mt4.type_id = mtm.type_id
|
||||||
|
left join sys_user u on u.user_id = rad.repairer and u.del_flag = '0'
|
||||||
WHERE
|
WHERE
|
||||||
1 = 1
|
1 = 1
|
||||||
<if test="userId != null ">
|
<if test="userId != null ">
|
||||||
|
|
@ -403,6 +406,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
mt1.type_name AS typeModelName,
|
mt1.type_name AS typeModelName,
|
||||||
mm.ma_code AS maCode,
|
mm.ma_code AS maCode,
|
||||||
rad.repairer AS repairPersonName,
|
rad.repairer AS repairPersonName,
|
||||||
|
su.nick_name as nickName,
|
||||||
rar.create_time AS repairTime
|
rar.create_time AS repairTime
|
||||||
FROM
|
FROM
|
||||||
repair_apply_details rad
|
repair_apply_details rad
|
||||||
|
|
@ -413,6 +417,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
LEFT JOIN ma_machine mm ON rad.ma_id = mm.ma_id
|
LEFT JOIN ma_machine mm ON rad.ma_id = mm.ma_id
|
||||||
LEFT JOIN repair_apply_record rar ON rad.task_id = rar.task_id
|
LEFT JOIN repair_apply_record rar ON rad.task_id = rar.task_id
|
||||||
and rad.type_id = rar.type_id and rar.ma_id = rad.ma_id
|
and rad.type_id = rar.type_id and rar.ma_id = rad.ma_id
|
||||||
|
left join sys_user su on rad.repairer = su.user_id and su.del_flag = '0'
|
||||||
WHERE
|
WHERE
|
||||||
rad.task_id = #{taskId} and rad.type_id = #{typeId}
|
rad.task_id = #{taskId} and rad.type_id = #{typeId}
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
|
@ -583,5 +588,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
)
|
)
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectUserNameById" resultType="java.lang.String">
|
||||||
|
SELECT
|
||||||
|
u.nick_name as repairPersonName
|
||||||
|
FROM
|
||||||
|
sys_user u
|
||||||
|
WHERE
|
||||||
|
u.user_id = #{repairPersonName}
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -1494,6 +1494,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
<select id="batchSelectInfo" resultType="com.bonus.material.basic.domain.UseStorageInfo">
|
<select id="batchSelectInfo" resultType="com.bonus.material.basic.domain.UseStorageInfo">
|
||||||
SELECT
|
SELECT
|
||||||
|
lod.parent_id AS leaseId,
|
||||||
lod.create_time AS outTime,
|
lod.create_time AS outTime,
|
||||||
GROUP_CONCAT(DISTINCT
|
GROUP_CONCAT(DISTINCT
|
||||||
CASE
|
CASE
|
||||||
|
|
|
||||||
|
|
@ -969,6 +969,27 @@
|
||||||
<if test="isExamine != null">#{isExamine},</if>
|
<if test="isExamine != null">#{isExamine},</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
|
<insert id="insertBackRecordByMaId">
|
||||||
|
insert into lease_back_record
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="parentId != null">parent_id,</if>
|
||||||
|
<if test="typeId != null">type_id,</if>
|
||||||
|
<if test="newTypeId != null">new_type,</if>
|
||||||
|
<if test="maId != null">ma_id,</if>
|
||||||
|
<if test="num != null">num,</if>
|
||||||
|
<if test="createBy != null">create_by,</if>
|
||||||
|
create_time,
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="parentId != null">#{parentId},</if>
|
||||||
|
<if test="typeId != null">#{typeId},</if>
|
||||||
|
<if test="newTypeId != null">#{newTypeId},</if>
|
||||||
|
<if test="maId != null">#{maId},</if>
|
||||||
|
<if test="num != null">#{num},</if>
|
||||||
|
<if test="createBy != null">#{createBy},</if>
|
||||||
|
now(),
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
<select id="selectWorkPeopleInfoList" resultMap="WorkPeopleInfoResult">
|
<select id="selectWorkPeopleInfoList" resultMap="WorkPeopleInfoResult">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
|
|
@ -877,7 +877,7 @@
|
||||||
partName IS NOT NULL
|
partName IS NOT NULL
|
||||||
</select>
|
</select>
|
||||||
<select id="getDetailsListApp" resultType="com.bonus.material.repair.domain.RepairPartDetails">
|
<select id="getDetailsListApp" resultType="com.bonus.material.repair.domain.RepairPartDetails">
|
||||||
SELECT a.*,
|
SELECT DISTINCT a.*,
|
||||||
rad.id as repairId,
|
rad.id as repairId,
|
||||||
rid.`status` as checkStatus,
|
rid.`status` as checkStatus,
|
||||||
sad.`status` as scrapStatus,
|
sad.`status` as scrapStatus,
|
||||||
|
|
@ -925,6 +925,14 @@
|
||||||
LEFT JOIN repair_input_details rid on rid.repair_id = rad.id and rad.is_ds = 0
|
LEFT JOIN repair_input_details rid on rid.repair_id = rad.id and rad.is_ds = 0
|
||||||
LEFT JOIN repair_audit_details rads on rads.repair_id = rad.id and rads.ma_id = a.maId
|
LEFT JOIN repair_audit_details rads on rads.repair_id = rad.id and rads.ma_id = a.maId
|
||||||
LEFT JOIN scrap_apply_details sad on sad.parent_id = rads.id
|
LEFT JOIN scrap_apply_details sad on sad.parent_id = rads.id
|
||||||
|
<where>
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
AND a.typeName = #{keyWord}
|
||||||
|
</if>
|
||||||
|
<if test="keyWord != null and keyWord != ''">
|
||||||
|
AND a.typeModelName = #{keyWord}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
<select id="getLossPart" resultType="com.bonus.material.repair.domain.vo.RepairPartInfo">
|
<select id="getLossPart" resultType="com.bonus.material.repair.domain.vo.RepairPartInfo">
|
||||||
<![CDATA[
|
<![CDATA[
|
||||||
|
|
|
||||||
|
|
@ -230,6 +230,7 @@
|
||||||
WHERE
|
WHERE
|
||||||
mm.ma_status='2' and sai.is_slt = 0
|
mm.ma_status='2' and sai.is_slt = 0
|
||||||
AND bp.pro_name is not null
|
AND bp.pro_name is not null
|
||||||
|
AND mt.jiju_type = 2
|
||||||
AND mm.next_check_time <= CURDATE()
|
AND mm.next_check_time <= CURDATE()
|
||||||
<if test="keyWord != null and keyWord != ''">
|
<if test="keyWord != null and keyWord != ''">
|
||||||
and (
|
and (
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue