add: 废箔称重
This commit is contained in:
@@ -0,0 +1,60 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.bound.controller;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.TableDataInfo;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.IBstIvtScaleboundService;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.dao.BstIvtScalebound;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/bstIvtScalebound")
|
||||||
|
public class BstIvtScaleboundController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtScaleboundService bstIvtScaleboundService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询设备与称重机绑定")
|
||||||
|
//@SaCheckPermission("@el.check('bstIvtScalebound:list')")
|
||||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(bstIvtScaleboundService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增设备与称重机绑定")
|
||||||
|
//@SaCheckPermission("@el.check('bstIvtScalebound:add')")
|
||||||
|
public ResponseEntity
|
||||||
|
<Object> create(@Validated @RequestBody BstIvtScalebound entity){
|
||||||
|
bstIvtScaleboundService.create(entity);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改设备与称重机绑定")
|
||||||
|
//@SaCheckPermission("@el.check('bstIvtScalebound:edit')")
|
||||||
|
public ResponseEntity<Object> update(@Validated @RequestBody BstIvtScalebound entity){
|
||||||
|
bstIvtScaleboundService.update(entity);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除设备与称重机绑定")
|
||||||
|
//@SaCheckPermission("@el.check('bstIvtScalebound:del')")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||||
|
bstIvtScaleboundService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.bound.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.dao.BstIvtScalebound;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务接口
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
public interface IBstIvtScaleboundService extends IService<BstIvtScalebound> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据分页
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @param pageable 分页参数
|
||||||
|
* @return IPage<BstIvtScalebound>
|
||||||
|
*/
|
||||||
|
IPage<BstIvtScalebound> queryAll(Map whereJson, PageQuery pageable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建
|
||||||
|
* @param entity /
|
||||||
|
*/
|
||||||
|
void create(BstIvtScalebound entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param entity /
|
||||||
|
*/
|
||||||
|
void update(BstIvtScalebound entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选删除
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void deleteAll(Set<String> ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.bound.service.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 添加'@Builder'注解最好不好添加'@NoArgsConstructor'
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("bst_ivt_scalebound")
|
||||||
|
public class BstIvtScalebound implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "scale_id", type = IdType.NONE)
|
||||||
|
/** id标识 */
|
||||||
|
private String scale_id;
|
||||||
|
|
||||||
|
/** 设备编码 */
|
||||||
|
private String device_code;
|
||||||
|
|
||||||
|
/** 称重机编码 */
|
||||||
|
private String scale_code;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.bound.service.dao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.dao.BstIvtScalebound;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
public interface BstIvtScaleboundMapper extends BaseMapper<BstIvtScalebound> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.nl.b_lms.bst.ivt.scale.bound.service.dao.mapper.BstIvtScaleboundMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.bound.service.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Builder;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description /
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class BstIvtScaleboundDto implements Serializable {
|
||||||
|
|
||||||
|
/** id标识 */
|
||||||
|
private String scale_id;
|
||||||
|
|
||||||
|
/** 设备编码 */
|
||||||
|
private String device_code;
|
||||||
|
|
||||||
|
/** 称重机编码 */
|
||||||
|
private String scale_code;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.bound.service.dto;
|
||||||
|
|
||||||
|
import org.nl.common.domain.query.BaseQuery;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.dao.BstIvtScalebound;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
public class BstIvtScaleboundQuery extends BaseQuery<BstIvtScalebound> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.bound.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.IBstIvtScaleboundService;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.dao.mapper.BstIvtScaleboundMapper;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.dao.BstIvtScalebound;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务实现
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class BstIvtScaleboundServiceImpl extends ServiceImpl<BstIvtScaleboundMapper, BstIvtScalebound> implements IBstIvtScaleboundService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BstIvtScaleboundMapper bstIvtScaleboundMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<BstIvtScalebound> queryAll(Map whereJson, PageQuery page){
|
||||||
|
LambdaQueryWrapper<BstIvtScalebound> lam = new LambdaQueryWrapper<>();
|
||||||
|
IPage<BstIvtScalebound> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||||
|
bstIvtScaleboundMapper.selectPage(pages, lam);
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(BstIvtScalebound entity) {
|
||||||
|
|
||||||
|
entity.setScale_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
|
bstIvtScaleboundMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(BstIvtScalebound entity) {
|
||||||
|
BstIvtScalebound dto = bstIvtScaleboundMapper.selectById(entity.getScale_id());
|
||||||
|
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||||
|
bstIvtScaleboundMapper.updateById(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteAll(Set<String> ids) {
|
||||||
|
// 真删除
|
||||||
|
bstIvtScaleboundMapper.deleteBatchIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.history.controller;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.common.TableDataInfo;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.modules.logging.annotation.Log;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.history.service.IBstIvtScalehistoryService;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.history.service.dao.BstIvtScalehistory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.HttpStatus;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/api/bstIvtScalehistory")
|
||||||
|
public class BstIvtScalehistoryController {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtScalehistoryService bstIvtScalehistoryService;
|
||||||
|
|
||||||
|
@GetMapping
|
||||||
|
@Log("查询称重历史记录")
|
||||||
|
//@SaCheckPermission("@el.check('bstIvtScalehistory:list')")
|
||||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
|
||||||
|
return new ResponseEntity<>(TableDataInfo.build(bstIvtScalehistoryService.queryAll(whereJson,page)),HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping
|
||||||
|
@Log("新增称重历史记录")
|
||||||
|
//@SaCheckPermission("@el.check('bstIvtScalehistory:add')")
|
||||||
|
public ResponseEntity
|
||||||
|
<Object> create(@Validated @RequestBody BstIvtScalehistory entity){
|
||||||
|
bstIvtScalehistoryService.create(entity);
|
||||||
|
return new ResponseEntity<>(HttpStatus.CREATED);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PutMapping
|
||||||
|
@Log("修改称重历史记录")
|
||||||
|
//@SaCheckPermission("@el.check('bstIvtScalehistory:edit')")
|
||||||
|
public ResponseEntity<Object> update(@Validated @RequestBody BstIvtScalehistory entity){
|
||||||
|
bstIvtScalehistoryService.update(entity);
|
||||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Log("删除称重历史记录")
|
||||||
|
//@SaCheckPermission("@el.check('bstIvtScalehistory:del')")
|
||||||
|
@DeleteMapping
|
||||||
|
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
|
||||||
|
bstIvtScalehistoryService.deleteAll(ids);
|
||||||
|
return new ResponseEntity<>(HttpStatus.OK);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.history.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.history.service.dao.BstIvtScalehistory;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务接口
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
public interface IBstIvtScalehistoryService extends IService<BstIvtScalehistory> {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询数据分页
|
||||||
|
* @param whereJson 条件
|
||||||
|
* @param pageable 分页参数
|
||||||
|
* @return IPage<BstIvtScalehistory>
|
||||||
|
*/
|
||||||
|
IPage<BstIvtScalehistory> queryAll(Map whereJson, PageQuery pageable);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建
|
||||||
|
* @param entity /
|
||||||
|
*/
|
||||||
|
void create(BstIvtScalehistory entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑
|
||||||
|
* @param entity /
|
||||||
|
*/
|
||||||
|
void update(BstIvtScalehistory entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 多选删除
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void deleteAll(Set<String> ids);
|
||||||
|
}
|
||||||
@@ -0,0 +1,46 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.history.service.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 添加'@Builder'注解最好不好添加'@NoArgsConstructor'
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@TableName("bst_ivt_scalehistory")
|
||||||
|
public class BstIvtScalehistory implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@TableId(value = "history_id", type = IdType.NONE)
|
||||||
|
/** id标识 */
|
||||||
|
private String history_id;
|
||||||
|
|
||||||
|
/** 设备编码 */
|
||||||
|
private String device_code;
|
||||||
|
|
||||||
|
/** 称重机编码 */
|
||||||
|
private String scale_code;
|
||||||
|
|
||||||
|
/** 当前重量 */
|
||||||
|
private String current_weight;
|
||||||
|
|
||||||
|
/** 上次重量 */
|
||||||
|
private String last_weight;
|
||||||
|
|
||||||
|
/** 重量差 */
|
||||||
|
private String weight_gap;
|
||||||
|
|
||||||
|
/** 记录时间 */
|
||||||
|
private String record_time;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.history.service.dao.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.history.service.dao.BstIvtScalehistory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
public interface BstIvtScalehistoryMapper extends BaseMapper<BstIvtScalehistory> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?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="org.nl.b_lms.bst.ivt.scale.history.service.dao.mapper.BstIvtScalehistoryMapper">
|
||||||
|
|
||||||
|
</mapper>
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.history.service.dto;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||||
|
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Builder;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description /
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
@Data
|
||||||
|
public class BstIvtScalehistoryDto implements Serializable {
|
||||||
|
|
||||||
|
/** id标识 */
|
||||||
|
private String history_id;
|
||||||
|
|
||||||
|
/** 设备编码 */
|
||||||
|
private String device_code;
|
||||||
|
|
||||||
|
/** 称重机编码 */
|
||||||
|
private String scale_code;
|
||||||
|
|
||||||
|
/** 当前重量 */
|
||||||
|
private String current_weight;
|
||||||
|
|
||||||
|
/** 上次重量 */
|
||||||
|
private String last_weight;
|
||||||
|
|
||||||
|
/** 重量差 */
|
||||||
|
private String weight_gap;
|
||||||
|
|
||||||
|
/** 记录时间 */
|
||||||
|
private String record_time;
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.history.service.dto;
|
||||||
|
|
||||||
|
import org.nl.common.domain.query.BaseQuery;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.history.service.dao.BstIvtScalehistory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
public class BstIvtScalehistoryQuery extends BaseQuery<BstIvtScalehistory> {
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package org.nl.b_lms.bst.ivt.scale.history.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.IdUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.common.domain.query.PageQuery;
|
||||||
|
import org.nl.common.utils.SecurityUtils;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.history.service.IBstIvtScalehistoryService;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.history.service.dao.mapper.BstIvtScalehistoryMapper;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.history.service.dao.BstIvtScalehistory;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description 服务实现
|
||||||
|
* @author lyd
|
||||||
|
* @date 2024-03-12
|
||||||
|
**/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class BstIvtScalehistoryServiceImpl extends ServiceImpl<BstIvtScalehistoryMapper, BstIvtScalehistory> implements IBstIvtScalehistoryService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private BstIvtScalehistoryMapper bstIvtScalehistoryMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<BstIvtScalehistory> queryAll(Map whereJson, PageQuery page){
|
||||||
|
LambdaQueryWrapper<BstIvtScalehistory> lam = new LambdaQueryWrapper<>();
|
||||||
|
IPage<BstIvtScalehistory> pages = new Page<>(page.getPage() + 1, page.getSize());
|
||||||
|
bstIvtScalehistoryMapper.selectPage(pages, lam);
|
||||||
|
return pages;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void create(BstIvtScalehistory entity) {
|
||||||
|
String now = DateUtil.now();
|
||||||
|
|
||||||
|
entity.setHistory_id(IdUtil.getSnowflake(1, 1).nextIdStr());
|
||||||
|
entity.setRecord_time(now);
|
||||||
|
bstIvtScalehistoryMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void update(BstIvtScalehistory entity) {
|
||||||
|
BstIvtScalehistory dto = bstIvtScalehistoryMapper.selectById(entity.getHistory_id());
|
||||||
|
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
|
||||||
|
|
||||||
|
String now = DateUtil.now();
|
||||||
|
entity.setRecord_time(now);
|
||||||
|
|
||||||
|
bstIvtScalehistoryMapper.updateById(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void deleteAll(Set<String> ids) {
|
||||||
|
// 真删除
|
||||||
|
bstIvtScalehistoryMapper.deleteBatchIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -48,4 +48,31 @@ public interface SlitterService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
JSONObject mesSlittingMachineSendMaterial(JSONObject param);
|
JSONObject mesSlittingMachineSendMaterial(JSONObject param);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分切子卷获取LMS,AGV废箔称重重量
|
||||||
|
* @param param "ResourceName": "设备编码"
|
||||||
|
* @return
|
||||||
|
* {
|
||||||
|
* "RTOAL": 1,
|
||||||
|
* "RTMSG": "操作成功!",
|
||||||
|
* "RTYPE": "S",
|
||||||
|
* "RTDAT": [
|
||||||
|
* {
|
||||||
|
* "ResourceName": "设备号",
|
||||||
|
* "Weight": "差异重量",
|
||||||
|
* “WeighDate”:"称重时间"
|
||||||
|
* }
|
||||||
|
* ]
|
||||||
|
* }
|
||||||
|
*/
|
||||||
|
JSONObject mesGetWeighingOfWasteFoil(JSONObject param);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分切子卷获取LMS,AGV废箔称重重量MES提交废箔成功
|
||||||
|
* @param param
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
JSONObject mesGetFinishWeighingOfWasteFoil(JSONObject param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,6 +11,9 @@ import lombok.SneakyThrows;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.b_lms.bst.ivt.cutpointivt.service.IBstIvtCutpointivtService;
|
import org.nl.b_lms.bst.ivt.cutpointivt.service.IBstIvtCutpointivtService;
|
||||||
import org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt;
|
import org.nl.b_lms.bst.ivt.cutpointivt.service.dao.BstIvtCutpointivt;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.IBstIvtScaleboundService;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.bound.service.dao.BstIvtScalebound;
|
||||||
|
import org.nl.b_lms.bst.ivt.scale.history.service.IBstIvtScalehistoryService;
|
||||||
import org.nl.b_lms.bst.ivt.shafttubeivt.service.IBstIvtShafttubeivtService;
|
import org.nl.b_lms.bst.ivt.shafttubeivt.service.IBstIvtShafttubeivtService;
|
||||||
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt;
|
import org.nl.b_lms.bst.ivt.shafttubeivt.service.dao.BstIvtShafttubeivt;
|
||||||
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
import org.nl.b_lms.pdm.bi.slittingproductionplan.service.IPdmBiSlittingproductionplanService;
|
||||||
@@ -28,6 +31,7 @@ import org.nl.b_lms.sch.tasks.slitter.mapper.SlitterMapper;
|
|||||||
import org.nl.b_lms.sch.tasks.slitter.service.SlitterService;
|
import org.nl.b_lms.sch.tasks.slitter.service.SlitterService;
|
||||||
import org.nl.common.utils.TaskUtils;
|
import org.nl.common.utils.TaskUtils;
|
||||||
import org.nl.modules.common.exception.BadRequestException;
|
import org.nl.modules.common.exception.BadRequestException;
|
||||||
|
import org.nl.wms.ext.acs.service.WmsToAcsService;
|
||||||
import org.redisson.api.RLock;
|
import org.redisson.api.RLock;
|
||||||
import org.redisson.api.RedissonClient;
|
import org.redisson.api.RedissonClient;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -71,6 +75,12 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
private RedissonClient redissonClient;
|
private RedissonClient redissonClient;
|
||||||
@Autowired
|
@Autowired
|
||||||
private TrussCallShaftCacheTask trussCallShaftCacheTask;
|
private TrussCallShaftCacheTask trussCallShaftCacheTask;
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtScaleboundService scaleBoundService;
|
||||||
|
@Autowired
|
||||||
|
private IBstIvtScalehistoryService scaleHistoryService;
|
||||||
|
@Autowired
|
||||||
|
private WmsToAcsService wmsToAcsService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject acsRequestShaftLoadTube(JSONObject param) {
|
public JSONObject acsRequestShaftLoadTube(JSONObject param) {
|
||||||
@@ -476,4 +486,67 @@ public class SlitterServiceImpl implements SlitterService {
|
|||||||
res.put("message", "子卷出站任务生成成功!");
|
res.put("message", "子卷出站任务生成成功!");
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject mesGetWeighingOfWasteFoil(JSONObject param) {
|
||||||
|
JSONObject res = new JSONObject();
|
||||||
|
JSONObject resData = new JSONObject();
|
||||||
|
String resourceName = param.getString("ResourceName");
|
||||||
|
// 获取称的设备号
|
||||||
|
BstIvtScalebound scaleEquipment = scaleBoundService.getOne(new LambdaQueryWrapper<BstIvtScalebound>()
|
||||||
|
.eq(BstIvtScalebound::getDevice_code, resourceName));
|
||||||
|
// 下发给acs称重
|
||||||
|
JSONArray acsParam = new JSONArray();
|
||||||
|
JSONObject acsWeighing = new JSONObject();
|
||||||
|
acsWeighing.put("device_code", scaleEquipment.getScale_code());
|
||||||
|
acsWeighing.put("code", "to_command");
|
||||||
|
acsWeighing.put("value", "6");
|
||||||
|
acsWeighing.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||||
|
acsParam.add(acsWeighing);
|
||||||
|
JSONObject action = wmsToAcsService.action(acsParam);
|
||||||
|
if (HttpStatus.HTTP_OK == action.getInteger("status")) {
|
||||||
|
// 记录数据库
|
||||||
|
res.put("RTOAL", 1);
|
||||||
|
res.put("RTMSG", "操作成功!");
|
||||||
|
res.put("RTYPE", "S");
|
||||||
|
res.put("RTDAT", resData);
|
||||||
|
resData.put("ResourceName", resourceName);
|
||||||
|
resData.put("Weight", "");
|
||||||
|
resData.put("WeighDate", "");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
res.put("RTOAL", 0);
|
||||||
|
res.put("RTMSG", "称重失败!");
|
||||||
|
res.put("RTYPE", "F");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public JSONObject mesGetFinishWeighingOfWasteFoil(JSONObject param) {
|
||||||
|
JSONObject res = new JSONObject();
|
||||||
|
String resourceName = param.getString("ResourceName");
|
||||||
|
// 获取称的设备号
|
||||||
|
BstIvtScalebound scaleEquipment = scaleBoundService.getOne(new LambdaQueryWrapper<BstIvtScalebound>()
|
||||||
|
.eq(BstIvtScalebound::getDevice_code, resourceName));
|
||||||
|
// 下发给acs称重
|
||||||
|
JSONArray acsParam = new JSONArray();
|
||||||
|
JSONObject acsWeighing = new JSONObject();
|
||||||
|
acsWeighing.put("device_code", scaleEquipment.getScale_code());
|
||||||
|
acsWeighing.put("code", "to_command");
|
||||||
|
acsWeighing.put("value", "8");
|
||||||
|
acsWeighing.put("product_area", SlitterConstant.SLITTER_TASK_AREA);
|
||||||
|
acsParam.add(acsWeighing);
|
||||||
|
JSONObject action = wmsToAcsService.action(acsParam);
|
||||||
|
if (HttpStatus.HTTP_OK == action.getInteger("status")) {
|
||||||
|
// 记录数据库
|
||||||
|
res.put("RTOAL", 1);
|
||||||
|
res.put("RTMSG", "操作成功!");
|
||||||
|
res.put("RTYPE", "S");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
res.put("RTOAL", 0);
|
||||||
|
res.put("RTMSG", "操作失败!");
|
||||||
|
res.put("RTYPE", "F");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bstIvtScalebound',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bstIvtScalebound/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bstIvtScalebound',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del }
|
||||||
86
lms/nladmin-ui/src/views/b_lms/bst/ivt/scale/bound/index.vue
Normal file
86
lms/nladmin-ui/src/views/b_lms/bst/ivt/scale/bound/index.vue
Normal file
@@ -0,0 +1,86 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission" />
|
||||||
|
<!--表单组件-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||||
|
<el-form-item label="设备编码">
|
||||||
|
<el-input v-model="form.device_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="称重机编码">
|
||||||
|
<el-input v-model="form.scale_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="device_code" label="设备编码" :min-width="flexWidth('device_code',crud.data,'设备编码')"/>
|
||||||
|
<el-table-column prop="scale_code" label="称重机编码" :min-width="flexWidth('scale_code',crud.data,'称重机编码')"/>
|
||||||
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation
|
||||||
|
:data="scope.row"
|
||||||
|
:permission="permission"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudBstIvtScalebound from './bstIvtScalebound'
|
||||||
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation.vue'
|
||||||
|
import crudOperation from '@crud/CRUD.operation.vue'
|
||||||
|
import udOperation from '@crud/UD.operation.vue'
|
||||||
|
import pagination from '@crud/Pagination.vue'
|
||||||
|
|
||||||
|
const defaultForm = {
|
||||||
|
scale_id: null,
|
||||||
|
device_code: null,
|
||||||
|
scale_code: null
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'BstIvtScalebound',
|
||||||
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '设备与称重机绑定',
|
||||||
|
url: 'api/bstIvtScalebound',
|
||||||
|
idField: 'scale_id',
|
||||||
|
sort: 'scale_id,desc',
|
||||||
|
crudMethod: { ...crudBstIvtScalebound }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
permission: {
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
} }
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bstIvtScalehistory',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(ids) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bstIvtScalehistory/',
|
||||||
|
method: 'delete',
|
||||||
|
data: ids
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/bstIvtScalehistory',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export default { add, edit, del }
|
||||||
106
lms/nladmin-ui/src/views/b_lms/bst/ivt/scale/history/index.vue
Normal file
106
lms/nladmin-ui/src/views/b_lms/bst/ivt/scale/history/index.vue
Normal file
@@ -0,0 +1,106 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<!--工具栏-->
|
||||||
|
<div class="head-container">
|
||||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||||
|
<crudOperation :permission="permission" />
|
||||||
|
<!--表单组件-->
|
||||||
|
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||||
|
<el-form-item label="设备编码">
|
||||||
|
<el-input v-model="form.device_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="称重机编码">
|
||||||
|
<el-input v-model="form.scale_code" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="当前重量">
|
||||||
|
<el-input v-model="form.current_weight" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="上次重量">
|
||||||
|
<el-input v-model="form.last_weight" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="重量差">
|
||||||
|
<el-input v-model="form.weight_gap" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="记录时间">
|
||||||
|
<el-input v-model="form.record_time" style="width: 370px;" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||||
|
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table ref="table" v-loading="crud.loading" :data="crud.data" size="mini" style="width: 100%;" @selection-change="crud.selectionChangeHandler">
|
||||||
|
<el-table-column type="selection" width="55" />
|
||||||
|
<el-table-column prop="device_code" label="设备编码" :min-width="flexWidth('device_code',crud.data,'设备编码')"/>
|
||||||
|
<el-table-column prop="scale_code" label="称重机编码" :min-width="flexWidth('scale_code',crud.data,'称重机编码')"/>
|
||||||
|
<el-table-column prop="current_weight" label="当前重量" :min-width="flexWidth('current_weight',crud.data,'当前重量')"/>
|
||||||
|
<el-table-column prop="last_weight" label="上次重量" :min-width="flexWidth('last_weight',crud.data,'上次重量')"/>
|
||||||
|
<el-table-column prop="weight_gap" label="重量差" :min-width="flexWidth('weight_gap',crud.data,'重量差')"/>
|
||||||
|
<el-table-column prop="record_time" label="记录时间" :min-width="flexWidth('record_time',crud.data,'记录时间')"/>
|
||||||
|
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<udOperation
|
||||||
|
:data="scope.row"
|
||||||
|
:permission="permission"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<pagination />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import crudBstIvtScalehistory from './bstIvtScalehistory'
|
||||||
|
import CRUD, {crud, form, header, presenter} from '@crud/crud'
|
||||||
|
import rrOperation from '@crud/RR.operation'
|
||||||
|
import crudOperation from '@crud/CRUD.operation'
|
||||||
|
import udOperation from '@crud/UD.operation'
|
||||||
|
import pagination from '@crud/Pagination'
|
||||||
|
|
||||||
|
const defaultForm = {
|
||||||
|
history_id: null,
|
||||||
|
device_code: null,
|
||||||
|
scale_code: null,
|
||||||
|
current_weight: null,
|
||||||
|
last_weight: null,
|
||||||
|
weight_gap: null,
|
||||||
|
record_time: null
|
||||||
|
}
|
||||||
|
export default {
|
||||||
|
name: 'BstIvtScalehistory',
|
||||||
|
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||||
|
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||||
|
cruds() {
|
||||||
|
return CRUD({
|
||||||
|
title: '称重历史记录',
|
||||||
|
url: 'api/bstIvtScalehistory',
|
||||||
|
idField: 'history_id',
|
||||||
|
sort: 'history_id,desc',
|
||||||
|
crudMethod: { ...crudBstIvtScalehistory }
|
||||||
|
})
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
permission: {
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
} }
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||||
|
[CRUD.HOOK.beforeRefresh]() {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
Reference in New Issue
Block a user