add:物料项点
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package org.nl.common.handler;
|
||||
|
||||
@FunctionalInterface
|
||||
public
|
||||
interface LockProcess {
|
||||
void process();
|
||||
}
|
||||
@@ -9,11 +9,15 @@ import java.util.HashMap;
|
||||
|
||||
public class CodeUtil{
|
||||
public static String getNewCode(String ruleCode) {
|
||||
|
||||
final String[] code = {""};
|
||||
HashMap<String,String> map = new HashMap<>();
|
||||
map.put("flag", "1");
|
||||
map.put("code", ruleCode);
|
||||
GenCodeService service = SpringContextHolder.getBean(GenCodeServiceImpl.class);
|
||||
return service.codeDemo(map);
|
||||
String codeId = service.queryIdByCode(ruleCode);
|
||||
RedissonUtils.lock(() -> {
|
||||
code[0] = service.codeDemo(map);
|
||||
}, codeId, 3);
|
||||
return code[0];
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,66 @@
|
||||
package org.nl.wms.ql.controller.inspection;
|
||||
|
||||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.wms.ql.service.inspection.IMdQlInspectionpointService;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
import org.nl.wms.ql.service.inspection.dto.InspectionQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 物料检测项点 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/mdQlInspectionpoint")
|
||||
public class MdQinspectionPointController {
|
||||
|
||||
@Autowired
|
||||
private IMdQlInspectionpointService inspectionpointService;
|
||||
|
||||
@GetMapping()
|
||||
public ResponseEntity<Object> query(InspectionQuery query, PageQuery pageQuery){
|
||||
return new ResponseEntity<>(TableDataInfo.build(inspectionpointService.page(query,pageQuery)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
public ResponseEntity<Object> create(@RequestBody JSONObject req){
|
||||
Assert.notNull(req,"参数不能为空");
|
||||
inspectionpointService.create(req);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/update")
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject req){
|
||||
Assert.notNull(req,"参数不能为空");
|
||||
MdQlInspectionpoint form = req.toJavaObject(MdQlInspectionpoint.class);
|
||||
form.setUpdateId(SecurityUtils.getCurrentUserId());
|
||||
form.setUpdateName(SecurityUtils.getCurrentNickName());
|
||||
form.setUpdateTime(new Date());
|
||||
inspectionpointService.updateById(form);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
public ResponseEntity<Object> delete(@RequestBody List<String> ids){
|
||||
Assert.notNull(ids,"参数不能为空");
|
||||
inspectionpointService.removeByIds(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,87 @@
|
||||
package org.nl.wms.ql.controller.inspection;
|
||||
|
||||
|
||||
import cn.dev33.satoken.annotation.SaIgnore;
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.common.exception.BadRequestException;
|
||||
import org.nl.modules.wql.util.SpringContextHolder;
|
||||
import org.nl.wms.ql.service.inspection.IMdQlInspectionpointService;
|
||||
import org.nl.wms.ql.service.inspection.IMdQlMaterialinspectionService;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlMaterialinspection;
|
||||
import org.nl.wms.ql.service.inspection.dto.MaterialInspectionQuery;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.transaction.PlatformTransactionManager;
|
||||
import org.springframework.transaction.TransactionDefinition;
|
||||
import org.springframework.transaction.TransactionStatus;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.transaction.support.DefaultTransactionDefinition;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 物料检测项点 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/api/materialInspection")
|
||||
public class MdQlMaterialinspectionController {
|
||||
|
||||
@Autowired
|
||||
private IMdQlInspectionpointService inspectionpointService;
|
||||
@Autowired
|
||||
private IMdQlMaterialinspectionService materialinspectionService;
|
||||
|
||||
|
||||
@GetMapping("/mst")
|
||||
@SaIgnore
|
||||
public ResponseEntity<Object> query(MaterialInspectionQuery query, PageQuery pageQuery){
|
||||
return new ResponseEntity<>(TableDataInfo.build(materialinspectionService.pageQuery(query,pageQuery)),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/create")
|
||||
public ResponseEntity<Object> create(@RequestBody JSONObject req){
|
||||
Assert.notNull(req,"参数不能为空");
|
||||
materialinspectionService.create(req);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
@PostMapping("/update")
|
||||
public ResponseEntity<Object> update(@RequestBody JSONObject req){
|
||||
Assert.notNull(req,"参数不能为空");
|
||||
MdQlMaterialinspection form = req.toJavaObject(MdQlMaterialinspection.class);
|
||||
form.setUpdateId(SecurityUtils.getCurrentUserId());
|
||||
form.setUpdateName(SecurityUtils.getCurrentNickName());
|
||||
form.setUpdateTime(new Date());
|
||||
materialinspectionService.updateById(form);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/delete")
|
||||
public ResponseEntity<Object> delete(@RequestBody List<String> ids){
|
||||
Assert.notNull(ids,"参数不能为空");
|
||||
inspectionpointService.removeByIds(ids);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.ql.controller.report;
|
||||
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 质检报告 前端控制器
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mdMeInspectionsheet")
|
||||
public class MdMeInspectionsheetController {
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
package org.nl.wms.ql.service.inspection;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
import org.nl.wms.ql.service.inspection.dto.InspectionQuery;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检测项点 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
public interface IMdQlInspectionpointService extends IService<MdQlInspectionpoint> {
|
||||
|
||||
void create(JSONObject form);
|
||||
|
||||
Page page(InspectionQuery query, PageQuery pageQuery);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.nl.wms.ql.service.inspection;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlMaterialinspection;
|
||||
import org.nl.wms.ql.service.inspection.dto.MaterialInspectionQuery;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 物料检测项点 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
public interface IMdQlMaterialinspectionService extends IService<MdQlMaterialinspection> {
|
||||
void create(JSONObject form);
|
||||
Page pageQuery(MaterialInspectionQuery query, PageQuery pageQuery);
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
package org.nl.wms.ql.service.inspection.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检测项点
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("md_ql_inspectionpoint")
|
||||
public class MdQlInspectionpoint implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 项目id
|
||||
*/
|
||||
@TableId(value = "inspection_id", type = IdType.NONE)
|
||||
private String inspectionId;
|
||||
|
||||
/**
|
||||
* 项目编码
|
||||
*/
|
||||
private String inspectionCode;
|
||||
|
||||
/**
|
||||
* 项目名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 检测类型
|
||||
*/
|
||||
private String inspectionType;
|
||||
|
||||
/**
|
||||
* 标准值
|
||||
*/
|
||||
private String standard;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createId;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String updateId;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String updateName;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
package org.nl.wms.ql.service.inspection.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 物料检测项点
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("md_ql_materialinspection")
|
||||
public class MdQlMaterialinspection implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
@TableId(value = "material_code")
|
||||
private String material_code;
|
||||
/**
|
||||
* 检测项名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 项目集合{"项目编号":"true"/123.000~123.500}
|
||||
*/
|
||||
private String inspections;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String updateId;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String updateName;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean isUsed;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
package org.nl.wms.ql.service.inspection.dao.TypeHandler;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import jdk.nashorn.internal.parser.JSONParser;
|
||||
import org.apache.ibatis.type.*;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2023/4/24 09:50
|
||||
*/
|
||||
@MappedJdbcTypes(JdbcType.VARCHAR)
|
||||
@MappedTypes(JSONArray.class)
|
||||
public class InspectionArrayHandler extends BaseTypeHandler<List<MdQlInspectionpoint>> {
|
||||
@Override
|
||||
public void setNonNullParameter(PreparedStatement ps, int i, List<MdQlInspectionpoint> parameter, JdbcType jdbcType) throws SQLException {
|
||||
ps.setString(i, JSON.toJSONString(parameter));
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MdQlInspectionpoint> getNullableResult(ResultSet rs, String columnName) throws SQLException {
|
||||
return JSONArray.parseArray(rs.getString(columnName),MdQlInspectionpoint.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MdQlInspectionpoint> getNullableResult(ResultSet rs, int columnIndex) throws SQLException {
|
||||
return JSONArray.parseArray(rs.getString(columnIndex),MdQlInspectionpoint.class);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<MdQlInspectionpoint> getNullableResult(CallableStatement cs, int columnIndex) throws SQLException {
|
||||
return JSONArray.parseArray(cs.getString(columnIndex),MdQlInspectionpoint.class);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.ql.service.inspection.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检测项点 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
public interface MdQlInspectionpointMapper extends BaseMapper<MdQlInspectionpoint> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
package org.nl.wms.ql.service.inspection.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlMaterialinspection;
|
||||
import org.nl.wms.ql.service.inspection.dto.MaterialInspectionQuery;
|
||||
import org.nl.wms.ql.service.inspection.dto.MdQlMaterialinspectionDto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 物料检测项点 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
public interface MdQlMaterialinspectionMapper extends BaseMapper<MdQlMaterialinspection> {
|
||||
|
||||
List<MdQlMaterialinspectionDto> pageQuery(@Param("query") MaterialInspectionQuery query);
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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.ql.service.inspection.dao.mapper.MdQlMaterialinspectionMapper">
|
||||
<resultMap id="BaseResultMap" type="org.nl.wms.ql.service.inspection.dto.MdQlMaterialinspectionDto" autoMapping="true">
|
||||
<id column="id" jdbcType="BIGINT" property="materialCode" />
|
||||
<result column="inspections" typeHandler="org.nl.wms.ql.service.inspection.dao.TypeHandler.InspectionArrayHandler" property="inspections"></result>
|
||||
</resultMap>
|
||||
<select id="pageQuery" resultMap="BaseResultMap">
|
||||
select
|
||||
`name`
|
||||
,material_code
|
||||
,inspections,version
|
||||
,create_id
|
||||
,create_name
|
||||
,create_time
|
||||
,update_id
|
||||
,update_name
|
||||
,update_time
|
||||
,is_used
|
||||
from md_ql_materialinspection
|
||||
<where>
|
||||
<if test="query.blurry != null and query.blurry != ''">
|
||||
material_code '%${query.blurry}%'
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,19 @@
|
||||
package org.nl.wms.ql.service.inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.common.domain.query.QParam;
|
||||
import org.nl.common.enums.QueryTEnum;
|
||||
import org.nl.system.service.dept.dao.SysDept;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2022/12/15 4:20 下午
|
||||
*/
|
||||
@Data
|
||||
public class InspectionQuery extends BaseQuery<MdQlInspectionpoint> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package org.nl.wms.ql.service.inspection.dto;
|
||||
|
||||
import lombok.Data;
|
||||
import org.nl.common.domain.query.BaseQuery;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlMaterialinspection;
|
||||
|
||||
/*
|
||||
* @author ZZQ
|
||||
* @Date 2022/12/15 4:20 下午
|
||||
*/
|
||||
@Data
|
||||
public class MaterialInspectionQuery extends BaseQuery<MdQlMaterialinspection> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
package org.nl.wms.ql.service.inspection.dto;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlMaterialinspection;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 物料检测项点
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@Data
|
||||
public class MdQlMaterialinspectionDto implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
private String materialCode;
|
||||
/**
|
||||
* 检测项名称
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 项目集合{"项目编号":"true"/123.000~123.500}
|
||||
*/
|
||||
private List<MdQlInspectionpoint> inspections;
|
||||
|
||||
/**
|
||||
* 版本号
|
||||
*/
|
||||
private String version;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String updateId;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String updateName;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
private Boolean isUsed;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
package org.nl.wms.ql.service.inspection.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import io.jsonwebtoken.lang.Assert;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.modules.system.util.CodeUtil;
|
||||
import org.nl.system.service.dept.dao.SysDept;
|
||||
import org.nl.wms.ql.service.inspection.IMdQlInspectionpointService;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
import org.nl.wms.ql.service.inspection.dao.mapper.MdQlInspectionpointMapper;
|
||||
import org.nl.wms.ql.service.inspection.dto.InspectionQuery;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 检测项点 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@Service
|
||||
public class MdQlInspectionpointServiceImpl extends ServiceImpl<MdQlInspectionpointMapper, MdQlInspectionpoint> implements IMdQlInspectionpointService {
|
||||
|
||||
|
||||
@Override
|
||||
public void create(JSONObject form) {
|
||||
Assert.notNull(form,"请求参数不能为空");
|
||||
MdQlInspectionpoint param = form.toJavaObject(MdQlInspectionpoint.class);
|
||||
param.setInspectionId(IdUtil.getStringId());
|
||||
param.setInspectionCode(CodeUtil.getNewCode("INSPECTION_POINT"));
|
||||
param.setCreateName(SecurityUtils.getCurrentNickName());
|
||||
param.setCreateId(SecurityUtils.getCurrentUserId());
|
||||
param.setCreateTime(new Date());
|
||||
this.save(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page page(InspectionQuery query, PageQuery pageQuery) {
|
||||
return this.page(pageQuery.build(MdQlInspectionpoint.class), query.build());
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package org.nl.wms.ql.service.inspection.impl;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import io.jsonwebtoken.lang.Assert;
|
||||
import org.nl.common.TableDataInfo;
|
||||
import org.nl.common.domain.query.PageQuery;
|
||||
import org.nl.common.utils.IdUtil;
|
||||
import org.nl.common.utils.SecurityUtils;
|
||||
import org.nl.system.service.user.dto.SysUserDetail;
|
||||
import org.nl.wms.ql.service.inspection.IMdQlMaterialinspectionService;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlInspectionpoint;
|
||||
import org.nl.wms.ql.service.inspection.dao.MdQlMaterialinspection;
|
||||
import org.nl.wms.ql.service.inspection.dao.mapper.MdQlMaterialinspectionMapper;
|
||||
import org.nl.wms.ql.service.inspection.dto.MaterialInspectionQuery;
|
||||
import org.nl.wms.ql.service.inspection.dto.MdQlMaterialinspectionDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 物料检测项点 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@Service
|
||||
public class MdQlMaterialinspectionServiceImpl extends ServiceImpl<MdQlMaterialinspectionMapper, MdQlMaterialinspection> implements IMdQlMaterialinspectionService {
|
||||
|
||||
@Resource
|
||||
MdQlMaterialinspectionMapper mdQlMaterialinspectionMapper;
|
||||
@Override
|
||||
public void create(JSONObject form) {
|
||||
Assert.notNull(form,"请求参数不能为空");
|
||||
MdQlMaterialinspection param = form.toJavaObject(MdQlMaterialinspection.class);
|
||||
param.setInspections(IdUtil.getStringId());
|
||||
param.setCreateName(SecurityUtils.getCurrentNickName());
|
||||
param.setCreateId(SecurityUtils.getCurrentUserId());
|
||||
param.setCreateTime(new Date());
|
||||
this.save(param);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page pageQuery(MaterialInspectionQuery query, PageQuery pageQuery) {
|
||||
return this.page(pageQuery.build(MdQlMaterialinspection.class), query.build());
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.ql.service.report;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.nl.wms.ql.service.report.dao.MdMeInspectionsheet;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 质检报告 服务类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
public interface IMdMeInspectionsheetService extends IService<MdMeInspectionsheet> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package org.nl.wms.ql.service.report.dao;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import java.util.Date;
|
||||
import java.io.Serializable;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 质检报告
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@TableName("md_me_inspectionsheet")
|
||||
public class MdMeInspectionsheet implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 质检id
|
||||
*/
|
||||
private String inspectionsheetId;
|
||||
|
||||
/**
|
||||
* 质检编号
|
||||
*/
|
||||
private String inspectionsheetCode;
|
||||
|
||||
/**
|
||||
* 物料id
|
||||
*/
|
||||
private String materialId;
|
||||
|
||||
/**
|
||||
* 批次
|
||||
*/
|
||||
private String pcsn;
|
||||
|
||||
/**
|
||||
* 质检单类型
|
||||
*/
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 检测项目集合
|
||||
*/
|
||||
private String inspections;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createId;
|
||||
|
||||
/**
|
||||
* 创建人姓名
|
||||
*/
|
||||
private String createName;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 修改人
|
||||
*/
|
||||
private String updateId;
|
||||
|
||||
/**
|
||||
* 修改人姓名
|
||||
*/
|
||||
private String updateName;
|
||||
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
private Boolean isDeleted;
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package org.nl.wms.ql.service.report.dao.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.nl.wms.ql.service.report.dao.MdMeInspectionsheet;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 质检报告 Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
public interface MdMeInspectionsheetMapper extends BaseMapper<MdMeInspectionsheet> {
|
||||
|
||||
}
|
||||
@@ -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.ql.service.report.dao.mapper.MdMeInspectionsheetMapper">
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,21 @@
|
||||
package org.nl.wms.ql.service.report.impl;
|
||||
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.nl.wms.ql.service.report.IMdMeInspectionsheetService;
|
||||
import org.nl.wms.ql.service.report.dao.MdMeInspectionsheet;
|
||||
import org.nl.wms.ql.service.report.dao.mapper.MdMeInspectionsheetMapper;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 质检报告 服务实现类
|
||||
* </p>
|
||||
*
|
||||
* @author generator
|
||||
* @since 2023-04-23
|
||||
*/
|
||||
@Service
|
||||
public class MdMeInspectionsheetServiceImpl extends ServiceImpl<MdMeInspectionsheetMapper, MdMeInspectionsheet> implements IMdMeInspectionsheetService {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user