69 changed files with 1435 additions and 67 deletions
Binary file not shown.
@ -0,0 +1,66 @@ |
|||||
|
package org.nl.wms.das.devicecheck.controller; |
||||
|
|
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.nl.common.base.TableDataInfo; |
||||
|
import org.nl.common.domain.query.PageQuery; |
||||
|
import org.nl.common.logging.annotation.Log; |
||||
|
import org.nl.wms.das.devicecheck.service.IDasDeviceCheckRecordService; |
||||
|
import org.nl.wms.das.devicecheck.service.dao.DasDeviceCheckRecord; |
||||
|
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 2023-08-01 |
||||
|
**/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "设备点检功能管理") |
||||
|
@RequestMapping("/api/dasDeviceCheckRecord") |
||||
|
public class DasDeviceCheckRecordController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IDasDeviceCheckRecordService dasDeviceCheckRecordService; |
||||
|
|
||||
|
@GetMapping |
||||
|
@Log("查询设备点检功能") |
||||
|
@ApiOperation("查询设备点检功能") |
||||
|
//@SaCheckPermission("@el.check('dasDeviceCheckRecord:list')")
|
||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){ |
||||
|
return new ResponseEntity<>(TableDataInfo.build(dasDeviceCheckRecordService.queryAll(whereJson,page)),HttpStatus.OK); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
@Log("新增设备点检功能") |
||||
|
@ApiOperation("新增设备点检功能") |
||||
|
//@SaCheckPermission("@el.check('dasDeviceCheckRecord:add')")
|
||||
|
public ResponseEntity<Object> create(@Validated @RequestBody DasDeviceCheckRecord entity){ |
||||
|
dasDeviceCheckRecordService.create(entity); |
||||
|
return new ResponseEntity<>(HttpStatus.CREATED); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
@Log("修改设备点检功能") |
||||
|
@ApiOperation("修改设备点检功能") |
||||
|
//@SaCheckPermission("@el.check('dasDeviceCheckRecord:edit')")
|
||||
|
public ResponseEntity<Object> update(@Validated @RequestBody DasDeviceCheckRecord entity){ |
||||
|
dasDeviceCheckRecordService.update(entity); |
||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
||||
|
} |
||||
|
|
||||
|
@Log("删除设备点检功能") |
||||
|
@ApiOperation("删除设备点检功能") |
||||
|
//@SaCheckPermission("@el.check('dasDeviceCheckRecord:del')")
|
||||
|
@DeleteMapping |
||||
|
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) { |
||||
|
dasDeviceCheckRecordService.deleteAll(ids); |
||||
|
return new ResponseEntity<>(HttpStatus.OK); |
||||
|
} |
||||
|
} |
@ -0,0 +1,43 @@ |
|||||
|
package org.nl.wms.das.devicecheck.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.wms.das.devicecheck.service.dao.DasDeviceCheckRecord; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
/** |
||||
|
* @description 服务接口 |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
public interface IDasDeviceCheckRecordService extends IService<DasDeviceCheckRecord> { |
||||
|
|
||||
|
/** |
||||
|
* 查询数据分页 |
||||
|
* @param whereJson 条件 |
||||
|
* @param pageable 分页参数 |
||||
|
* @return IPage<DasDeviceCheckRecord> |
||||
|
*/ |
||||
|
IPage<DasDeviceCheckRecord> queryAll(Map whereJson, PageQuery pageable); |
||||
|
|
||||
|
/** |
||||
|
* 创建 |
||||
|
* @param entity / |
||||
|
*/ |
||||
|
void create(DasDeviceCheckRecord entity); |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
* @param entity / |
||||
|
*/ |
||||
|
void update(DasDeviceCheckRecord entity); |
||||
|
|
||||
|
/** |
||||
|
* 多选删除 |
||||
|
* @param ids / |
||||
|
*/ |
||||
|
void deleteAll(Set<String> ids); |
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
package org.nl.wms.das.devicecheck.service.dao; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @description / |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@TableName("das_device_check_record") |
||||
|
public class DasDeviceCheckRecord implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@TableId(value = "record_id", type = IdType.NONE) |
||||
|
@ApiModelProperty(value = "记录标识") |
||||
|
private String record_id; |
||||
|
|
||||
|
@ApiModelProperty(value = "账号") |
||||
|
private String username; |
||||
|
|
||||
|
@ApiModelProperty(value = "用户名") |
||||
|
private String person_name; |
||||
|
|
||||
|
@ApiModelProperty(value = "记录时间") |
||||
|
private String record_time; |
||||
|
|
||||
|
@ApiModelProperty(value = "设备号") |
||||
|
private String device_code; |
||||
|
|
||||
|
@ApiModelProperty(value = "备注") |
||||
|
private String remark; |
||||
|
|
||||
|
@ApiModelProperty(value = "点检状态") |
||||
|
private String check_status; |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package org.nl.wms.das.devicecheck.service.dao.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.nl.wms.das.devicecheck.service.dao.DasDeviceCheckRecord; |
||||
|
|
||||
|
/** |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
public interface DasDeviceCheckRecordMapper extends BaseMapper<DasDeviceCheckRecord> { |
||||
|
|
||||
|
} |
@ -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.wms.das.devicecheck.service.dao.mapper.DasDeviceCheckRecordMapper"> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,34 @@ |
|||||
|
package org.nl.wms.das.devicecheck.service.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @description / |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class DasDeviceCheckRecordDto implements Serializable { |
||||
|
|
||||
|
/** 记录标识 */ |
||||
|
private String record_id; |
||||
|
|
||||
|
/** 账号 */ |
||||
|
private String username; |
||||
|
|
||||
|
/** 用户名 */ |
||||
|
private String person_name; |
||||
|
|
||||
|
/** 记录时间 */ |
||||
|
private String record_time; |
||||
|
|
||||
|
/** 设备号 */ |
||||
|
private String device_code; |
||||
|
|
||||
|
/** 备注 */ |
||||
|
private String remark; |
||||
|
|
||||
|
/** 点检状态 */ |
||||
|
private String check_status; |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package org.nl.wms.das.devicecheck.service.dto; |
||||
|
|
||||
|
import org.nl.common.domain.query.BaseQuery; |
||||
|
import org.nl.wms.das.devicecheck.service.dao.DasDeviceCheckRecord; |
||||
|
|
||||
|
/** |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
public class DasDeviceCheckRecordQuery extends BaseQuery<DasDeviceCheckRecord> { |
||||
|
|
||||
|
} |
@ -0,0 +1,75 @@ |
|||||
|
package org.nl.wms.das.devicecheck.service.impl; |
||||
|
|
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
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.common.domain.query.PageQuery; |
||||
|
import org.nl.common.exception.BadRequestException; |
||||
|
import org.nl.common.utils.SecurityUtils; |
||||
|
import org.nl.system.service.user.ISysUserService; |
||||
|
import org.nl.system.service.user.dao.SysUser; |
||||
|
import org.nl.wms.das.devicecheck.service.IDasDeviceCheckRecordService; |
||||
|
import org.nl.wms.das.devicecheck.service.dao.mapper.DasDeviceCheckRecordMapper; |
||||
|
import org.nl.wms.das.devicecheck.service.dao.DasDeviceCheckRecord; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
/** |
||||
|
* @description 服务实现 |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class DasDeviceCheckRecordServiceImpl extends ServiceImpl<DasDeviceCheckRecordMapper, DasDeviceCheckRecord> implements IDasDeviceCheckRecordService { |
||||
|
|
||||
|
@Autowired |
||||
|
private DasDeviceCheckRecordMapper dasDeviceCheckRecordMapper; |
||||
|
@Autowired |
||||
|
private ISysUserService userService; |
||||
|
|
||||
|
@Override |
||||
|
public IPage<DasDeviceCheckRecord> queryAll(Map whereJson, PageQuery page){ |
||||
|
LambdaQueryWrapper<DasDeviceCheckRecord> lam = new LambdaQueryWrapper<>(); |
||||
|
IPage<DasDeviceCheckRecord> pages = new Page<>(page.getPage() + 1, page.getSize()); |
||||
|
dasDeviceCheckRecordMapper.selectPage(pages, lam); |
||||
|
return pages; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void create(DasDeviceCheckRecord entity) { |
||||
|
SysUser sysUser = userService.getOne(new LambdaQueryWrapper<SysUser>() |
||||
|
.eq(SysUser::getUsername, entity.getUsername())); |
||||
|
String now = DateUtil.now(); |
||||
|
entity.setRecord_id(IdUtil.getSnowflake(1, 1).nextIdStr()); |
||||
|
entity.setRecord_time(now); |
||||
|
entity.setPerson_name(sysUser.getPerson_name()); |
||||
|
dasDeviceCheckRecordMapper.insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void update(DasDeviceCheckRecord entity) { |
||||
|
DasDeviceCheckRecord dto = dasDeviceCheckRecordMapper.selectById(entity.getRecord_id()); |
||||
|
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!"); |
||||
|
String now = DateUtil.now(); |
||||
|
entity.setRecord_time(now); |
||||
|
|
||||
|
dasDeviceCheckRecordMapper.updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void deleteAll(Set<String> ids) { |
||||
|
// 真删除
|
||||
|
dasDeviceCheckRecordMapper.deleteBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,66 @@ |
|||||
|
package org.nl.wms.das.inspection.controller; |
||||
|
|
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.nl.common.base.TableDataInfo; |
||||
|
import org.nl.common.domain.query.PageQuery; |
||||
|
import org.nl.common.logging.annotation.Log; |
||||
|
import org.nl.wms.das.inspection.service.IDasQualityInspectionService; |
||||
|
import org.nl.wms.das.inspection.service.dao.DasQualityInspection; |
||||
|
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 2023-08-01 |
||||
|
**/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "质检记录管理") |
||||
|
@RequestMapping("/api/dasQualityInspection") |
||||
|
public class DasQualityInspectionController { |
||||
|
|
||||
|
@Autowired |
||||
|
private IDasQualityInspectionService dasQualityInspectionService; |
||||
|
|
||||
|
@GetMapping |
||||
|
@Log("查询质检记录") |
||||
|
@ApiOperation("查询质检记录") |
||||
|
//@SaCheckPermission("@el.check('dasQualityInspection:list')")
|
||||
|
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){ |
||||
|
return new ResponseEntity<>(TableDataInfo.build(dasQualityInspectionService.queryAll(whereJson,page)),HttpStatus.OK); |
||||
|
} |
||||
|
|
||||
|
@PostMapping |
||||
|
@Log("新增质检记录") |
||||
|
@ApiOperation("新增质检记录") |
||||
|
//@SaCheckPermission("@el.check('dasQualityInspection:add')")
|
||||
|
public ResponseEntity<Object> create(@Validated @RequestBody DasQualityInspection entity){ |
||||
|
dasQualityInspectionService.create(entity); |
||||
|
return new ResponseEntity<>(HttpStatus.CREATED); |
||||
|
} |
||||
|
|
||||
|
@PutMapping |
||||
|
@Log("修改质检记录") |
||||
|
@ApiOperation("修改质检记录") |
||||
|
//@SaCheckPermission("@el.check('dasQualityInspection:edit')")
|
||||
|
public ResponseEntity<Object> update(@Validated @RequestBody DasQualityInspection entity){ |
||||
|
dasQualityInspectionService.update(entity); |
||||
|
return new ResponseEntity<>(HttpStatus.NO_CONTENT); |
||||
|
} |
||||
|
|
||||
|
@Log("删除质检记录") |
||||
|
@ApiOperation("删除质检记录") |
||||
|
//@SaCheckPermission("@el.check('dasQualityInspection:del')")
|
||||
|
@DeleteMapping |
||||
|
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) { |
||||
|
dasQualityInspectionService.deleteAll(ids); |
||||
|
return new ResponseEntity<>(HttpStatus.OK); |
||||
|
} |
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
package org.nl.wms.das.inspection.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.wms.das.inspection.service.dao.DasQualityInspection; |
||||
|
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyTaskRequest; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
/** |
||||
|
* @description 服务接口 |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
public interface IDasQualityInspectionService extends IService<DasQualityInspection> { |
||||
|
|
||||
|
/** |
||||
|
* 查询数据分页 |
||||
|
* @param whereJson 条件 |
||||
|
* @param pageable 分页参数 |
||||
|
* @return IPage<DasQualityInspection> |
||||
|
*/ |
||||
|
IPage<DasQualityInspection> queryAll(Map whereJson, PageQuery pageable); |
||||
|
|
||||
|
/** |
||||
|
* 创建 |
||||
|
* @param entity / |
||||
|
*/ |
||||
|
void create(DasQualityInspection entity); |
||||
|
|
||||
|
/** |
||||
|
* 编辑 |
||||
|
* @param entity / |
||||
|
*/ |
||||
|
void update(DasQualityInspection entity); |
||||
|
|
||||
|
/** |
||||
|
* 多选删除 |
||||
|
* @param ids / |
||||
|
*/ |
||||
|
void deleteAll(Set<String> ids); |
||||
|
|
||||
|
void createByAcs(ApplyTaskRequest applyTaskRequest); |
||||
|
} |
@ -0,0 +1,46 @@ |
|||||
|
package org.nl.wms.das.inspection.service.dao; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.IdType; |
||||
|
import com.baomidou.mybatisplus.annotation.TableId; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.EqualsAndHashCode; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @description / |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
@Data |
||||
|
@EqualsAndHashCode(callSuper = false) |
||||
|
@TableName("das_quality_inspection") |
||||
|
public class DasQualityInspection implements Serializable { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@TableId(value = "inspection_id", type = IdType.NONE) |
||||
|
@ApiModelProperty(value = "检测标识") |
||||
|
private String inspection_id; |
||||
|
|
||||
|
@ApiModelProperty(value = "质检时间") |
||||
|
private String inspection_time; |
||||
|
|
||||
|
@ApiModelProperty(value = "半成品物料") |
||||
|
private String half_material_code; |
||||
|
|
||||
|
@ApiModelProperty(value = "托盘号") |
||||
|
private String vehicle_code; |
||||
|
|
||||
|
@ApiModelProperty(value = "数量") |
||||
|
private String material_qty; |
||||
|
|
||||
|
@ApiModelProperty(value = "拆垛工位") |
||||
|
private String point_code; |
||||
|
|
||||
|
@ApiModelProperty(value = "分拣工单") |
||||
|
private String workorder_code; |
||||
|
|
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package org.nl.wms.das.inspection.service.dao.mapper; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import org.nl.wms.das.inspection.service.dao.DasQualityInspection; |
||||
|
|
||||
|
/** |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
public interface DasQualityInspectionMapper extends BaseMapper<DasQualityInspection> { |
||||
|
|
||||
|
} |
@ -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.wms.das.inspection.service.dao.mapper.DasQualityInspectionMapper"> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,34 @@ |
|||||
|
package org.nl.wms.das.inspection.service.dto; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @description / |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
@Data |
||||
|
public class DasQualityInspectionDto implements Serializable { |
||||
|
|
||||
|
/** 检测标识 */ |
||||
|
private String inspection_id; |
||||
|
|
||||
|
/** 质检时间 */ |
||||
|
private String inspection_time; |
||||
|
|
||||
|
/** 半成品物料 */ |
||||
|
private String half_material_code; |
||||
|
|
||||
|
/** 托盘号 */ |
||||
|
private String vehicle_code; |
||||
|
|
||||
|
/** 数量 */ |
||||
|
private String material_qty; |
||||
|
|
||||
|
/** 拆垛工位 */ |
||||
|
private String point_code; |
||||
|
|
||||
|
/** 分拣工单 */ |
||||
|
private String workorder_code; |
||||
|
} |
@ -0,0 +1,12 @@ |
|||||
|
package org.nl.wms.das.inspection.service.dto; |
||||
|
|
||||
|
import org.nl.common.domain.query.BaseQuery; |
||||
|
import org.nl.wms.das.inspection.service.dao.DasQualityInspection; |
||||
|
|
||||
|
/** |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
public class DasQualityInspectionQuery extends BaseQuery<DasQualityInspection> { |
||||
|
|
||||
|
} |
@ -0,0 +1,115 @@ |
|||||
|
package org.nl.wms.das.inspection.service.impl; |
||||
|
|
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import cn.hutool.core.util.IdUtil; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
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.common.domain.query.PageQuery; |
||||
|
import org.nl.common.exception.BadRequestException; |
||||
|
import org.nl.common.utils.SecurityUtils; |
||||
|
import org.nl.wms.das.inspection.service.IDasQualityInspectionService; |
||||
|
import org.nl.wms.das.inspection.service.dao.mapper.DasQualityInspectionMapper; |
||||
|
import org.nl.wms.das.inspection.service.dao.DasQualityInspection; |
||||
|
import org.nl.wms.database.material.service.IMdBaseMaterialService; |
||||
|
import org.nl.wms.database.material.service.dao.MdBaseMaterial; |
||||
|
import org.nl.wms.ext.acs.service.dto.to.wms.ApplyTaskRequest; |
||||
|
import org.nl.wms.pdm.workorder.service.IPdmBdWorkorderService; |
||||
|
import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder; |
||||
|
import org.nl.wms.sch.point.service.ISchBasePointService; |
||||
|
import org.nl.wms.sch.point.service.dao.SchBasePoint; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.Map; |
||||
|
import java.util.Set; |
||||
|
|
||||
|
/** |
||||
|
* @description 服务实现 |
||||
|
* @author lyd |
||||
|
* @date 2023-08-01 |
||||
|
**/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class DasQualityInspectionServiceImpl extends ServiceImpl<DasQualityInspectionMapper, DasQualityInspection> implements IDasQualityInspectionService { |
||||
|
|
||||
|
@Autowired |
||||
|
private DasQualityInspectionMapper dasQualityInspectionMapper; |
||||
|
@Autowired |
||||
|
private ISchBasePointService pointService; |
||||
|
@Autowired |
||||
|
private IPdmBdWorkorderService workorderService; |
||||
|
@Autowired |
||||
|
private IMdBaseMaterialService materialService; |
||||
|
|
||||
|
@Override |
||||
|
public IPage<DasQualityInspection> queryAll(Map whereJson, PageQuery page){ |
||||
|
LambdaQueryWrapper<DasQualityInspection> lam = new LambdaQueryWrapper<>(); |
||||
|
IPage<DasQualityInspection> pages = new Page<>(page.getPage() + 1, page.getSize()); |
||||
|
dasQualityInspectionMapper.selectPage(pages, lam); |
||||
|
return pages; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void create(DasQualityInspection entity) { |
||||
|
String now = DateUtil.now(); |
||||
|
entity.setInspection_id(IdUtil.getSnowflake(1, 1).nextIdStr()); |
||||
|
entity.setInspection_time(now); |
||||
|
dasQualityInspectionMapper.insert(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void update(DasQualityInspection entity) { |
||||
|
DasQualityInspection dto = dasQualityInspectionMapper.selectById(entity.getInspection_id()); |
||||
|
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!"); |
||||
|
String now = DateUtil.now(); |
||||
|
entity.setInspection_time(now); |
||||
|
|
||||
|
dasQualityInspectionMapper.updateById(entity); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void deleteAll(Set<String> ids) { |
||||
|
// 真删除
|
||||
|
dasQualityInspectionMapper.deleteBatchIds(ids); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void createByAcs(ApplyTaskRequest applyTaskRequest) { |
||||
|
String deviceCode = applyTaskRequest.getDevice_code(); |
||||
|
if (ObjectUtil.isEmpty(deviceCode)) { |
||||
|
throw new BadRequestException("质检记录-拆垛工位不能为空"); |
||||
|
} |
||||
|
String vehicleCode = applyTaskRequest.getVehicle_code(); |
||||
|
if (ObjectUtil.isEmpty(vehicleCode)) { |
||||
|
throw new BadRequestException("质检记录-载具编码不能为空"); |
||||
|
} |
||||
|
LambdaQueryWrapper<SchBasePoint> pointLam = new QueryWrapper<SchBasePoint>().lambda(); |
||||
|
pointLam.eq(SchBasePoint::getPoint_code, deviceCode); |
||||
|
SchBasePoint one = pointService.getOne(pointLam); // 拆垛工位
|
||||
|
// 生产中的工单, 如果ACS能给就直接查
|
||||
|
PdmBdWorkorder deviceProductionTask = workorderService.getDeviceProductionTask(one.getParent_point_code()); |
||||
|
if (ObjectUtil.isEmpty(deviceProductionTask)) { |
||||
|
throw new BadRequestException("质检记录-设备[" + one.getParent_point_code() + "]未存在生产中的工单"); |
||||
|
} |
||||
|
MdBaseMaterial baseMaterial = materialService.getById(deviceProductionTask.getMaterial_id()); |
||||
|
if (ObjectUtil.isEmpty(baseMaterial)) { |
||||
|
throw new BadRequestException("质检记录-物料ID[" + deviceProductionTask.getMaterial_id() + "]不存在"); |
||||
|
} |
||||
|
DasQualityInspection dasQualityInspection = new DasQualityInspection(); |
||||
|
dasQualityInspection.setInspection_id(IdUtil.getSnowflake(1,1).nextIdStr()); |
||||
|
dasQualityInspection.setPoint_code(deviceCode); |
||||
|
dasQualityInspection.setInspection_time(DateUtil.now()); |
||||
|
dasQualityInspection.setVehicle_code(vehicleCode); |
||||
|
dasQualityInspection.setMaterial_qty("1"); |
||||
|
dasQualityInspection.setHalf_material_code(baseMaterial.getHalf_material_code()); |
||||
|
dasQualityInspection.setWorkorder_code(deviceProductionTask.getWorkorder_code()); |
||||
|
dasQualityInspectionMapper.insert(dasQualityInspection); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,60 @@ |
|||||
|
package org.nl.wms.pda.controller; |
||||
|
|
||||
|
import cn.dev33.satoken.annotation.SaIgnore; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.nl.common.logging.annotation.Log; |
||||
|
import org.nl.wms.das.devicecheck.service.IDasDeviceCheckRecordService; |
||||
|
import org.nl.wms.das.devicecheck.service.dao.DasDeviceCheckRecord; |
||||
|
import org.nl.wms.pda.service.PdaService; |
||||
|
import org.nl.wms.pdm.workorder.service.dao.PdmBdWorkorder; |
||||
|
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.PostMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
|
||||
|
/** |
||||
|
* @Author: lyd |
||||
|
* @Description: 手持接口 |
||||
|
* @Date: 2023/8/1 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "手持接口") |
||||
|
@RequestMapping("/api/pda") |
||||
|
public class PdaController { |
||||
|
@Autowired |
||||
|
private IDasDeviceCheckRecordService deviceCheckRecordService; |
||||
|
@Autowired |
||||
|
private PdaService pdaService; |
||||
|
@PostMapping("/deviceCheck/verify") |
||||
|
@Log("设备点检") |
||||
|
@ApiOperation("设备点检") |
||||
|
@SaIgnore |
||||
|
public ResponseEntity<Object> deviceCheck(@Validated @RequestBody DasDeviceCheckRecord entity){ |
||||
|
deviceCheckRecordService.create(entity); |
||||
|
return new ResponseEntity<>(HttpStatus.OK); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/deviceCheck/deviceInfo") |
||||
|
@Log("设备下拉框数据") |
||||
|
@ApiOperation("设备下拉框数据") |
||||
|
@SaIgnore |
||||
|
public ResponseEntity<Object> deviceInfo(){ |
||||
|
return new ResponseEntity<>(pdaService.getDeviceInfo(), HttpStatus.OK); |
||||
|
} |
||||
|
|
||||
|
@PostMapping("/deviceCheck/deviceStatus") |
||||
|
@Log("设备状态下拉框数据") |
||||
|
@ApiOperation("设备状态下拉框数据") |
||||
|
@SaIgnore |
||||
|
public ResponseEntity<Object> deviceStatus(){ |
||||
|
return new ResponseEntity<>(pdaService.getDeviceStatus(), HttpStatus.OK); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package org.nl.wms.pda.service; |
||||
|
|
||||
|
import org.nl.wms.pda.service.dao.vo.DropdownListVo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author: lyd |
||||
|
* @Description: |
||||
|
* @Date: 2023/8/1 |
||||
|
*/ |
||||
|
public interface PdaService { |
||||
|
List<DropdownListVo> getDeviceInfo(); |
||||
|
|
||||
|
List<DropdownListVo> getDeviceStatus(); |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package org.nl.wms.pda.service.dao.mapper; |
||||
|
|
||||
|
import org.nl.wms.pda.service.dao.vo.DropdownListVo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author: lyd |
||||
|
* @Description: 手持mapper接口 |
||||
|
* @Date: 2023/8/1 |
||||
|
*/ |
||||
|
public interface PdaMapper { |
||||
|
List<DropdownListVo> getDeviceInfo(); |
||||
|
|
||||
|
List<DropdownListVo> getDictByCode(String code); |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
<?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.wms.pda.service.dao.mapper.PdaMapper"> |
||||
|
|
||||
|
<select id="getDeviceInfo" resultType="org.nl.wms.pda.service.dao.vo.DropdownListVo"> |
||||
|
SELECT |
||||
|
p.point_code AS `value`, |
||||
|
p.point_name AS label |
||||
|
FROM |
||||
|
`sch_base_point` p |
||||
|
WHERE p.region_code = 'YZ' AND p.point_type = '1' AND p.point_code = p.parent_point_code |
||||
|
</select> |
||||
|
<select id="getDictByCode" resultType="org.nl.wms.pda.service.dao.vo.DropdownListVo"> |
||||
|
SELECT |
||||
|
`value`, |
||||
|
label |
||||
|
FROM |
||||
|
`sys_dict` |
||||
|
WHERE `code` = #{code} |
||||
|
</select> |
||||
|
</mapper> |
@ -0,0 +1,16 @@ |
|||||
|
package org.nl.wms.pda.service.dao.vo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
/** |
||||
|
* @Author: lyd |
||||
|
* @Description: 下拉框数据 |
||||
|
* @Date: 2023/8/1 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DropdownListVo implements Serializable { |
||||
|
private String value; |
||||
|
private String label; |
||||
|
} |
@ -0,0 +1,32 @@ |
|||||
|
package org.nl.wms.pda.service.impl; |
||||
|
|
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.nl.wms.pda.service.PdaService; |
||||
|
import org.nl.wms.pda.service.dao.mapper.PdaMapper; |
||||
|
import org.nl.wms.pda.service.dao.vo.DropdownListVo; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Author: lyd |
||||
|
* @Description: 实现类 |
||||
|
* @Date: 2023/8/1 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class PdaServiceImpl implements PdaService { |
||||
|
@Autowired |
||||
|
private PdaMapper pdaMapper; |
||||
|
@Override |
||||
|
public List<DropdownListVo> getDeviceInfo() { |
||||
|
// 暂定压机区域
|
||||
|
return pdaMapper.getDeviceInfo(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<DropdownListVo> getDeviceStatus() { |
||||
|
return pdaMapper.getDictByCode("device_status"); |
||||
|
} |
||||
|
} |
@ -0,0 +1,23 @@ |
|||||
|
package org.nl.wms.pdm.workorder.service.dao.vo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Author: lyd |
||||
|
* @Description: 下发工单给ACS |
||||
|
* @Date: 2023/8/1 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class AcsWorkOrderVo { |
||||
|
private String workorder_code; |
||||
|
private String device_code; |
||||
|
private String material_code; |
||||
|
private String plan_qty; |
||||
|
private String a; |
||||
|
private String b; |
||||
|
private String h; |
||||
|
private String w; |
||||
|
private String size; // 尺寸允许误差
|
||||
|
private String single_weight; // 单重允许误差
|
||||
|
private String drawing_address; // 图纸地址
|
||||
|
} |
@ -1,9 +1,16 @@ |
|||||
package org.nl.wms.report.service.dao.mapper; |
package org.nl.wms.report.service.dao.mapper; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSONObject; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import org.nl.wms.report.service.dao.vo.IOKilnReportVo; |
||||
|
|
||||
/** |
/** |
||||
* @Author: lyd |
* @Author: lyd |
||||
* @Description: 报表mapper |
* @Description: 报表mapper |
||||
* @Date: 2023/7/21 |
* @Date: 2023/7/21 |
||||
*/ |
*/ |
||||
public interface ReportMapper { |
public interface ReportMapper { |
||||
|
IPage<IOKilnReportVo> intoKilnReportByPage(IPage<IOKilnReportVo> pages, JSONObject query); |
||||
|
|
||||
|
IPage<IOKilnReportVo> outKilnReportByPage(IPage<IOKilnReportVo> pages, JSONObject object); |
||||
} |
} |
||||
|
@ -1,5 +1,31 @@ |
|||||
<?xml version="1.0" encoding="UTF-8"?> |
<?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"> |
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="org.nl.wms.report.service.dao.mapper.ReportMapper"> |
<mapper namespace="org.nl.wms.report.service.dao.mapper.ReportMapper"> |
||||
|
<select id="intoKilnReportByPage" resultType="org.nl.wms.report.service.dao.vo.IOKilnReportVo"> |
||||
|
SELECT |
||||
|
vg.into_kiln_time, |
||||
|
vg.vehicle_code, |
||||
|
vg.pcsn, |
||||
|
vg.material_qty, |
||||
|
m.material_code, |
||||
|
m.material_name |
||||
|
FROM |
||||
|
`sch_base_vehiclematerialgroup` vg |
||||
|
LEFT JOIN md_base_material m ON m.material_id = vg.material_id |
||||
|
WHERE vg.into_kiln_time IS NOT NULL AND vg.out_kiln_time IS NULL |
||||
|
</select> |
||||
|
<select id="outKilnReportByPage" resultType="org.nl.wms.report.service.dao.vo.IOKilnReportVo"> |
||||
|
SELECT |
||||
|
vg.into_kiln_time, |
||||
|
vg.out_kiln_time, |
||||
|
vg.vehicle_code, |
||||
|
vg.pcsn, |
||||
|
vg.material_qty, |
||||
|
m.material_code, |
||||
|
m.material_name |
||||
|
FROM |
||||
|
`sch_base_vehiclematerialgroup` vg |
||||
|
LEFT JOIN md_base_material m ON m.material_id = vg.material_id |
||||
|
WHERE vg.into_kiln_time IS NOT NULL AND vg.out_kiln_time IS NOT NULL |
||||
|
</select> |
||||
</mapper> |
</mapper> |
||||
|
@ -0,0 +1,19 @@ |
|||||
|
package org.nl.wms.report.service.dao.vo; |
||||
|
|
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @Author: lyd |
||||
|
* @Description: 出入窑记录报表 |
||||
|
* @Date: 2023/8/1 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class IOKilnReportVo { |
||||
|
private String into_kiln_time; |
||||
|
private String out_kiln_time; |
||||
|
private String vehicle_code; |
||||
|
private String pcsn; |
||||
|
private String material_qty; |
||||
|
private String material_code; |
||||
|
private String material_name; |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
import request from '@/utils/request' |
||||
|
|
||||
|
export function add(data) { |
||||
|
return request({ |
||||
|
url: 'api/dasDeviceCheckRecord', |
||||
|
method: 'post', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function del(ids) { |
||||
|
return request({ |
||||
|
url: 'api/dasDeviceCheckRecord/', |
||||
|
method: 'delete', |
||||
|
data: ids |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function edit(data) { |
||||
|
return request({ |
||||
|
url: 'api/dasDeviceCheckRecord', |
||||
|
method: 'put', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export default { add, edit, del } |
@ -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.username" style="width: 370px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="用户名"> |
||||
|
<el-input v-model="form.person_name" 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-item label="设备号"> |
||||
|
<el-input v-model="form.device_code" style="width: 370px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="备注"> |
||||
|
<el-input v-model="form.remark" style="width: 370px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="点检状态"> |
||||
|
<el-input v-model="form.check_status" 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="username" label="账号" :min-width="flexWidth('username',crud.data,'账号')"/> |
||||
|
<el-table-column prop="person_name" label="用户名" :min-width="flexWidth('person_name',crud.data,'用户名')"/> |
||||
|
<el-table-column prop="record_time" label="记录时间" :min-width="flexWidth('record_time',crud.data,'记录时间')"/> |
||||
|
<el-table-column prop="device_code" label="设备号" :min-width="flexWidth('device_code',crud.data,'设备号')"/> |
||||
|
<el-table-column prop="remark" label="备注" :min-width="flexWidth('remark',crud.data,'备注')"/> |
||||
|
<el-table-column prop="check_status" label="点检状态" :min-width="flexWidth('check_status',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 crudDasDeviceCheckRecord from './dasDeviceCheckRecord' |
||||
|
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 = { |
||||
|
record_id: null, |
||||
|
username: null, |
||||
|
person_name: null, |
||||
|
record_time: null, |
||||
|
device_code: null, |
||||
|
remark: null, |
||||
|
check_status: null |
||||
|
} |
||||
|
export default { |
||||
|
name: 'DasDeviceCheckRecord', |
||||
|
components: { pagination, crudOperation, rrOperation, udOperation }, |
||||
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
||||
|
cruds() { |
||||
|
return CRUD({ |
||||
|
title: '设备点检功能', |
||||
|
url: 'api/dasDeviceCheckRecord', |
||||
|
idField: 'record_id', |
||||
|
sort: 'record_id,desc', |
||||
|
crudMethod: { ...crudDasDeviceCheckRecord } |
||||
|
}) |
||||
|
}, |
||||
|
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/dasQualityInspection', |
||||
|
method: 'post', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function del(ids) { |
||||
|
return request({ |
||||
|
url: 'api/dasQualityInspection/', |
||||
|
method: 'delete', |
||||
|
data: ids |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export function edit(data) { |
||||
|
return request({ |
||||
|
url: 'api/dasQualityInspection', |
||||
|
method: 'put', |
||||
|
data |
||||
|
}) |
||||
|
} |
||||
|
|
||||
|
export default { add, edit, del } |
@ -0,0 +1,107 @@ |
|||||
|
<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.inspection_time" style="width: 370px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="半成品物料"> |
||||
|
<el-input v-model="form.half_material_code" style="width: 370px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="托盘号"> |
||||
|
<el-input v-model="form.vehicle_code" style="width: 370px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="数量"> |
||||
|
<el-input v-model="form.material_qty" style="width: 370px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="拆垛工位"> |
||||
|
<el-input v-model="form.point_code" style="width: 370px;" /> |
||||
|
</el-form-item> |
||||
|
<el-form-item label="分拣工单"> |
||||
|
<el-input v-model="form.workorder_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="inspection_time" label="质检时间" :min-width="flexWidth('inspection_time',crud.data,'质检时间')" /> |
||||
|
<el-table-column prop="half_material_code" label="半成品物料" :min-width="flexWidth('half_material_code',crud.data,'半成品物料')" /> |
||||
|
<el-table-column prop="vehicle_code" label="托盘号" :min-width="flexWidth('vehicle_code',crud.data,'托盘号')" /> |
||||
|
<el-table-column prop="material_qty" label="数量" :min-width="flexWidth('material_qty',crud.data,'数量')" /> |
||||
|
<el-table-column prop="point_code" label="拆垛工位" :min-width="flexWidth('point_code',crud.data,'拆垛工位')" /> |
||||
|
<el-table-column prop="workorder_code" label="分拣工单" :min-width="flexWidth('workorder_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 crudDasQualityInspection from './dasQualityInspection' |
||||
|
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 = { |
||||
|
inspection_id: null, |
||||
|
inspection_time: null, |
||||
|
half_material_code: null, |
||||
|
vehicle_code: null, |
||||
|
material_qty: null, |
||||
|
point_code: null, |
||||
|
workorder_code: null |
||||
|
} |
||||
|
export default { |
||||
|
name: 'DasQualityInspection', |
||||
|
components: { pagination, crudOperation, rrOperation, udOperation }, |
||||
|
mixins: [presenter(), header(), form(defaultForm), crud()], |
||||
|
cruds() { |
||||
|
return CRUD({ |
||||
|
title: '质检记录', |
||||
|
url: 'api/dasQualityInspection', |
||||
|
idField: 'inspection_id', |
||||
|
sort: 'inspection_id,desc', |
||||
|
crudMethod: { ...crudDasQualityInspection } |
||||
|
}) |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
permission: { |
||||
|
}, |
||||
|
rules: { |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
||||
|
[CRUD.HOOK.beforeRefresh]() { |
||||
|
return true |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,72 @@ |
|||||
|
<template> |
||||
|
<div class="app-container"> |
||||
|
<!--工具栏--> |
||||
|
<div class="head-container"> |
||||
|
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'--> |
||||
|
<crudOperation :permission="permission" /> |
||||
|
<!--表格渲染--> |
||||
|
<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="into_kiln_time" label="入窑时间" :min-width="flexWidth('into_kiln_time',crud.data,'入窑时间')" /> |
||||
|
<el-table-column prop="vehicle_code" label="托盘号" :min-width="flexWidth('vehicle_code',crud.data,'托盘号')" /> |
||||
|
<el-table-column prop="pcsn" label="批次" :min-width="flexWidth('pcsn',crud.data,'数量')" /> |
||||
|
<el-table-column prop="material_code" label="产品编码" :min-width="flexWidth('material_code',crud.data,'拆垛工位')" /> |
||||
|
<el-table-column prop="material_name" label="产品名称" :min-width="flexWidth('material_name',crud.data,'分拣工单')" /> |
||||
|
<el-table-column prop="material_qty" label="产品数量" :min-width="flexWidth('material_qty',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 CRUD, { crud, 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' |
||||
|
export default { |
||||
|
name: 'IntoKilnReport', |
||||
|
components: { pagination, crudOperation, rrOperation, udOperation }, |
||||
|
mixins: [presenter(), header(), crud()], |
||||
|
cruds() { |
||||
|
return CRUD({ |
||||
|
title: '入窑记录报表', |
||||
|
url: 'api/report/intoKilnReport', |
||||
|
optShow: { |
||||
|
add: false, |
||||
|
edit: false, |
||||
|
del: false, |
||||
|
download: false |
||||
|
} |
||||
|
}) |
||||
|
}, |
||||
|
data() { |
||||
|
return { |
||||
|
permission: { |
||||
|
}, |
||||
|
rules: { |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
// 钩子:在获取表格数据之前执行,false 则代表不获取数据 |
||||
|
[CRUD.HOOK.beforeRefresh]() { |
||||
|
return true |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style scoped> |
||||
|
|
||||
|
</style> |
Loading…
Reference in new issue