Browse Source

fix: 去除wms包下内容

master
李永德 2 years ago
parent
commit
544ed42364
  1. 7
      nladmin-system/nlsso-server/src/main/java/org/nl/AppRun.java
  2. 66
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/controller/MdBaseMaterialController.java
  3. 43
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/IMdBaseMaterialService.java
  4. 77
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/MdBaseMaterial.java
  5. 12
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.java
  6. 5
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.xml
  7. 65
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dto/MdBaseMaterialDto.java
  8. 12
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dto/MdBaseMaterialQuery.java
  9. 80
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/impl/MdBaseMaterialServiceImpl.java
  10. 66
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/controller/MdBaseWorkshopController.java
  11. 43
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/IMdBaseWorkshopService.java
  12. 57
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dao/MdBaseWorkshop.java
  13. 12
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dao/mapper/MdBaseWorkshopMapper.java
  14. 5
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dao/mapper/MdBaseWorkshopMapper.xml
  15. 46
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dto/MdBaseWorkshopDto.java
  16. 12
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dto/MdBaseWorkshopQuery.java
  17. 74
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/impl/MdBaseWorkshopServiceImpl.java
  18. 66
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/controller/PdmBdWorkorderController.java
  19. 43
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/IPdmBdWorkorderService.java
  20. 113
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/PdmBdWorkorder.java
  21. 12
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/mapper/PdmBdWorkorderMapper.java
  22. 5
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/mapper/PdmBdWorkorderMapper.xml
  23. 101
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dto/PdmBdWorkorderDto.java
  24. 12
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dto/PdmBdWorkorderQuery.java
  25. 79
      nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/impl/PdmBdWorkorderServiceImpl.java

7
nladmin-system/nlsso-server/src/main/java/org/nl/AppRun.java

@ -5,11 +5,7 @@ import com.alicp.jetcache.anno.config.EnableCreateCacheAnnotation;
import com.alicp.jetcache.anno.config.EnableMethodCache;
import io.swagger.annotations.Api;
import org.mybatis.spring.annotation.MapperScan;
import org.nl.common.mnt.websocket.WebSocketServer;
import org.nl.config.SpringContextHolder;
import org.nl.system.service.notice.ISysNoticeService;
import org.nl.system.service.notice.impl.SysNoticeServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory;
@ -41,9 +37,6 @@ import org.springframework.web.bind.annotation.RestController;
@MapperScan("org.nl.**.mapper")
public class AppRun {
@Autowired
private ISysNoticeService noticeService;
public static void main(String[] args) {
SpringApplication.run(AppRun.class, args);

66
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/controller/MdBaseMaterialController.java

@ -1,66 +0,0 @@
package org.nl.wms.database.material.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.database.material.service.IMdBaseMaterialService;
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
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-05-05
**/
@Slf4j
@RestController
@Api(tags = "物料基础信息管理")
@RequestMapping("/api/mdBaseMaterial")
public class MdBaseMaterialController {
@Autowired
private IMdBaseMaterialService mdBaseMaterialService;
@GetMapping
@Log("查询物料基础信息")
@ApiOperation("查询物料基础信息")
//@SaCheckPermission("@el.check('mdBaseMaterial:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
return new ResponseEntity<>(TableDataInfo.build(mdBaseMaterialService.queryAll(whereJson,page)),HttpStatus.OK);
}
@PostMapping
@Log("新增物料基础信息")
@ApiOperation("新增物料基础信息")
//@SaCheckPermission("@el.check('mdBaseMaterial:add')")
public ResponseEntity<Object> create(@Validated @RequestBody MdBaseMaterial entity){
mdBaseMaterialService.create(entity);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PutMapping
@Log("修改物料基础信息")
@ApiOperation("修改物料基础信息")
//@SaCheckPermission("@el.check('mdBaseMaterial:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody MdBaseMaterial entity){
mdBaseMaterialService.update(entity);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除物料基础信息")
@ApiOperation("删除物料基础信息")
//@SaCheckPermission("@el.check('mdBaseMaterial:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
mdBaseMaterialService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
}

43
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/IMdBaseMaterialService.java

@ -1,43 +0,0 @@
package org.nl.wms.database.material.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.database.material.service.dao.MdBaseMaterial;
import java.util.Map;
import java.util.Set;
/**
* @description 服务接口
* @author lyd
* @date 2023-05-05
**/
public interface IMdBaseMaterialService extends IService<MdBaseMaterial> {
/**
* 查询数据分页
* @param whereJson 条件
* @param pageable 分页参数
* @return IPage<MdBaseMaterial>
*/
IPage<MdBaseMaterial> queryAll(Map whereJson, PageQuery pageable);
/**
* 创建
* @param entity /
*/
void create(MdBaseMaterial entity);
/**
* 编辑
* @param entity /
*/
void update(MdBaseMaterial entity);
/**
* 多选删除
* @param ids /
*/
void deleteAll(Set<String> ids);
}

77
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/MdBaseMaterial.java

@ -1,77 +0,0 @@
package org.nl.wms.database.material.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;
import java.math.BigDecimal;
/**
* @description /
* @author lyd
* @date 2023-05-05
**/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("md_base_material")
public class MdBaseMaterial implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "material_id", type = IdType.NONE)
@ApiModelProperty(value = "物料标识")
private String material_id;
@ApiModelProperty(value = "物料编码")
private String material_code;
@ApiModelProperty(value = "物料名称 ")
private String material_name;
@ApiModelProperty(value = "物料规格")
private String material_spec;
@ApiModelProperty(value = "物料分类标识")
private String class_id;
@ApiModelProperty(value = "静置时间(分钟)")
private BigDecimal standing_time;
@ApiModelProperty(value = "车间编码")
private String workshop_code;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "是否启用")
private Integer is_used;
@ApiModelProperty(value = "是否删除")
private Integer is_delete;
@ApiModelProperty(value = "创建人")
private String create_id;
@ApiModelProperty(value = "创建人")
private String create_name;
@ApiModelProperty(value = "创建时间")
private String create_time;
@ApiModelProperty(value = "修改人")
private String update_id;
@ApiModelProperty(value = "修改人")
private String update_name;
@ApiModelProperty(value = "修改时间")
private String update_time;
@ApiModelProperty(value = "外部标识")
private String ext_id;
}

12
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.java

@ -1,12 +0,0 @@
package org.nl.wms.database.material.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
/**
* @author lyd
* @date 2023-05-05
**/
public interface MdBaseMaterialMapper extends BaseMapper<MdBaseMaterial> {
}

5
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dao/mapper/MdBaseMaterialMapper.xml

@ -1,5 +0,0 @@
<?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.database.material.service.dao.mapper.MdBaseMaterialMapper">
</mapper>

65
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dto/MdBaseMaterialDto.java

@ -1,65 +0,0 @@
package org.nl.wms.database.material.service.dto;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @description /
* @author lyd
* @date 2023-05-05
**/
@Data
public class MdBaseMaterialDto implements Serializable {
/** 物料标识 */
private String material_id;
/** 物料编码 */
private String material_code;
/** 物料名称 */
private String material_name;
/** 物料规格 */
private String material_spec;
/** 物料分类标识 */
private String class_id;
/** 静置时间(分钟) */
private BigDecimal standing_time;
/** 车间编码 */
private String workshop_code;
/** 备注 */
private String remark;
/** 是否启用 */
private Integer is_used;
/** 是否删除 */
private Integer is_delete;
/** 创建人 */
private String create_id;
/** 创建人 */
private String create_name;
/** 创建时间 */
private String create_time;
/** 修改人 */
private String update_id;
/** 修改人 */
private String update_name;
/** 修改时间 */
private String update_time;
/** 外部标识 */
private String ext_id;
}

12
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/dto/MdBaseMaterialQuery.java

@ -1,12 +0,0 @@
package org.nl.wms.database.material.service.dto;
import org.nl.common.domain.query.BaseQuery;
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
/**
* @author lyd
* @date 2023-05-05
**/
public class MdBaseMaterialQuery extends BaseQuery<MdBaseMaterial> {
}

80
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/material/service/impl/MdBaseMaterialServiceImpl.java

@ -1,80 +0,0 @@
package org.nl.wms.database.material.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.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.database.material.service.IMdBaseMaterialService;
import org.nl.wms.database.material.service.dao.MdBaseMaterial;
import org.nl.wms.database.material.service.dao.mapper.MdBaseMaterialMapper;
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-05-05
**/
@Slf4j
@Service
public class MdBaseMaterialServiceImpl extends ServiceImpl<MdBaseMaterialMapper, MdBaseMaterial> implements IMdBaseMaterialService {
@Autowired
private MdBaseMaterialMapper mdBaseMaterialMapper;
@Override
public IPage<MdBaseMaterial> queryAll(Map whereJson, PageQuery page){
LambdaQueryWrapper<MdBaseMaterial> lam = new LambdaQueryWrapper<>();
IPage<MdBaseMaterial> pages = new Page<>(page.getPage() + 1, page.getSize());
mdBaseMaterialMapper.selectPage(pages, lam);
return pages;
}
@Override
public void create(MdBaseMaterial entity) {
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
entity.setMaterial_id(IdUtil.getSnowflake(1, 1).nextIdStr());
entity.setCreate_id(currentUserId);
entity.setCreate_name(nickName);
entity.setCreate_time(now);
entity.setUpdate_id(currentUserId);
entity.setUpdate_name(nickName);
entity.setUpdate_time(now);
mdBaseMaterialMapper.insert(entity);
}
@Override
public void update(MdBaseMaterial entity) {
MdBaseMaterial dto = mdBaseMaterialMapper.selectById(entity.getMaterial_id());
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
entity.setUpdate_id(currentUserId);
entity.setUpdate_name(nickName);
entity.setUpdate_time(now);
mdBaseMaterialMapper.updateById(entity);
}
@Override
public void deleteAll(Set<String> ids) {
// 真删除
mdBaseMaterialMapper.deleteBatchIds(ids);
}
}

66
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/controller/MdBaseWorkshopController.java

@ -1,66 +0,0 @@
package org.nl.wms.database.workshop.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.database.workshop.service.IMdBaseWorkshopService;
import org.nl.wms.database.workshop.service.dao.MdBaseWorkshop;
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-05-05
**/
@Slf4j
@RestController
@Api(tags = "车间基础信息管理")
@RequestMapping("/api/mdBaseWorkshop")
public class MdBaseWorkshopController {
@Autowired
private IMdBaseWorkshopService mdBaseWorkshopService;
@GetMapping
@Log("查询车间基础信息")
@ApiOperation("查询车间基础信息")
//@SaCheckPermission("@el.check('mdBaseWorkshop:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
return new ResponseEntity<>(TableDataInfo.build(mdBaseWorkshopService.queryAll(whereJson,page)),HttpStatus.OK);
}
@PostMapping
@Log("新增车间基础信息")
@ApiOperation("新增车间基础信息")
//@SaCheckPermission("@el.check('mdBaseWorkshop:add')")
public ResponseEntity<Object> create(@Validated @RequestBody MdBaseWorkshop entity){
mdBaseWorkshopService.create(entity);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PutMapping
@Log("修改车间基础信息")
@ApiOperation("修改车间基础信息")
//@SaCheckPermission("@el.check('mdBaseWorkshop:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody MdBaseWorkshop entity){
mdBaseWorkshopService.update(entity);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除车间基础信息")
@ApiOperation("删除车间基础信息")
//@SaCheckPermission("@el.check('mdBaseWorkshop:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
mdBaseWorkshopService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
}

43
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/IMdBaseWorkshopService.java

@ -1,43 +0,0 @@
package org.nl.wms.database.workshop.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.database.workshop.service.dao.MdBaseWorkshop;
import java.util.Map;
import java.util.Set;
/**
* @description 服务接口
* @author lyd
* @date 2023-05-05
**/
public interface IMdBaseWorkshopService extends IService<MdBaseWorkshop> {
/**
* 查询数据分页
* @param whereJson 条件
* @param pageable 分页参数
* @return IPage<MdBaseWorkshop>
*/
IPage<MdBaseWorkshop> queryAll(Map whereJson, PageQuery pageable);
/**
* 创建
* @param entity /
*/
void create(MdBaseWorkshop entity);
/**
* 编辑
* @param entity /
*/
void update(MdBaseWorkshop entity);
/**
* 多选删除
* @param ids /
*/
void deleteAll(Set<String> ids);
}

57
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dao/MdBaseWorkshop.java

@ -1,57 +0,0 @@
package org.nl.wms.database.workshop.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 javax.persistence.Table;
import java.io.Serializable;
/**
* @description /
* @author lyd
* @date 2023-05-05
**/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("md_base_workshop")
public class MdBaseWorkshop implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "workshop_code", type = IdType.NONE)
@ApiModelProperty(value = "车间编码")
private String workshop_code;
@ApiModelProperty(value = "车间名称 ")
private String workshop_name;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "是否启用")
private Boolean is_used;
@ApiModelProperty(value = "是否删除")
private Boolean is_delete;
@ApiModelProperty(value = "创建人")
private String create_id;
@ApiModelProperty(value = "创建人")
private String create_name;
@ApiModelProperty(value = "创建时间")
private String create_time;
@ApiModelProperty(value = "修改人")
private String update_id;
@ApiModelProperty(value = "修改人")
private String update_name;
@ApiModelProperty(value = "修改时间")
private String update_time;
}

12
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dao/mapper/MdBaseWorkshopMapper.java

@ -1,12 +0,0 @@
package org.nl.wms.database.workshop.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.wms.database.workshop.service.dao.MdBaseWorkshop;
/**
* @author lyd
* @date 2023-05-05
**/
public interface MdBaseWorkshopMapper extends BaseMapper<MdBaseWorkshop> {
}

5
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dao/mapper/MdBaseWorkshopMapper.xml

@ -1,5 +0,0 @@
<?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.database.workshop.service.dao.mapper.MdBaseWorkshopMapper">
</mapper>

46
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dto/MdBaseWorkshopDto.java

@ -1,46 +0,0 @@
package org.nl.wms.database.workshop.service.dto;
import lombok.Data;
import java.io.Serializable;
/**
* @description /
* @author lyd
* @date 2023-05-05
**/
@Data
public class MdBaseWorkshopDto implements Serializable {
/** 车间编码 */
private String workshop_code;
/** 车间名称 */
private String workshop_name;
/** 备注 */
private String remark;
/** 是否启用 */
private String is_used;
/** 是否删除 */
private String is_delete;
/** 创建人 */
private Long create_id;
/** 创建人 */
private String create_name;
/** 创建时间 */
private String create_time;
/** 修改人 */
private Long update_id;
/** 修改人 */
private String update_name;
/** 修改时间 */
private String update_time;
}

12
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/dto/MdBaseWorkshopQuery.java

@ -1,12 +0,0 @@
package org.nl.wms.database.workshop.service.dto;
import org.nl.common.domain.query.BaseQuery;
import org.nl.wms.database.workshop.service.dao.MdBaseWorkshop;
/**
* @author lyd
* @date 2023-05-05
**/
public class MdBaseWorkshopQuery extends BaseQuery<MdBaseWorkshop> {
}

74
nladmin-system/nlsso-server/src/main/java/org/nl/wms/database/workshop/service/impl/MdBaseWorkshopServiceImpl.java

@ -1,74 +0,0 @@
package org.nl.wms.database.workshop.service.impl;
import cn.hutool.core.date.DateUtil;
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.extern.slf4j.Slf4j;
import org.nl.common.domain.query.PageQuery;
import org.nl.common.utils.SecurityUtils;
import org.nl.wms.database.workshop.service.IMdBaseWorkshopService;
import org.nl.wms.database.workshop.service.dao.mapper.MdBaseWorkshopMapper;
import org.nl.wms.database.workshop.service.dao.MdBaseWorkshop;
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-05-05
**/
@Slf4j
@Service
public class MdBaseWorkshopServiceImpl extends ServiceImpl<MdBaseWorkshopMapper, MdBaseWorkshop> implements IMdBaseWorkshopService {
@Autowired
private MdBaseWorkshopMapper mdBaseWorkshopMapper;
@Override
public IPage<MdBaseWorkshop> queryAll(Map whereJson, PageQuery page){
LambdaQueryWrapper<MdBaseWorkshop> lam = new LambdaQueryWrapper<>();
IPage<MdBaseWorkshop> pages = new Page<>(page.getPage() + 1, page.getSize());
mdBaseWorkshopMapper.selectPage(pages, lam);
return pages;
}
@Override
public void create(MdBaseWorkshop entity) {
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
entity.setCreate_id(currentUserId);
entity.setCreate_name(nickName);
entity.setCreate_time(now);
entity.setUpdate_id(currentUserId);
entity.setUpdate_name(nickName);
entity.setUpdate_time(now);
mdBaseWorkshopMapper.insert(entity);
}
@Override
public void update(MdBaseWorkshop entity) {
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
entity.setUpdate_id(currentUserId);
entity.setUpdate_name(nickName);
entity.setUpdate_time(now);
mdBaseWorkshopMapper.updateById(entity);
}
@Override
public void deleteAll(Set<String> ids) {
// 真删除
mdBaseWorkshopMapper.deleteBatchIds(ids);
}
}

66
nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/controller/PdmBdWorkorderController.java

@ -1,66 +0,0 @@
package org.nl.wms.pdm.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.pdm.service.IPdmBdWorkorderService;
import org.nl.wms.pdm.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.*;
import java.util.Map;
import java.util.Set;
/**
* @author lyd
* @date 2023-05-05
**/
@Slf4j
@RestController
@Api(tags = "工单管理管理")
@RequestMapping("/api/pdmBdWorkorder")
public class PdmBdWorkorderController {
@Autowired
private IPdmBdWorkorderService pdmBdWorkorderService;
@GetMapping
@Log("查询工单管理")
@ApiOperation("查询工单管理")
//@SaCheckPermission("@el.check('pdmBdWorkorder:list')")
public ResponseEntity<Object> query(@RequestParam Map whereJson, PageQuery page){
return new ResponseEntity<>(TableDataInfo.build(pdmBdWorkorderService.queryAll(whereJson,page)),HttpStatus.OK);
}
@PostMapping
@Log("新增工单管理")
@ApiOperation("新增工单管理")
//@SaCheckPermission("@el.check('pdmBdWorkorder:add')")
public ResponseEntity<Object> create(@Validated @RequestBody PdmBdWorkorder entity){
pdmBdWorkorderService.create(entity);
return new ResponseEntity<>(HttpStatus.CREATED);
}
@PutMapping
@Log("修改工单管理")
@ApiOperation("修改工单管理")
//@SaCheckPermission("@el.check('pdmBdWorkorder:edit')")
public ResponseEntity<Object> update(@Validated @RequestBody PdmBdWorkorder entity){
pdmBdWorkorderService.update(entity);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@Log("删除工单管理")
@ApiOperation("删除工单管理")
//@SaCheckPermission("@el.check('pdmBdWorkorder:del')")
@DeleteMapping
public ResponseEntity<Object> delete(@RequestBody Set<String> ids) {
pdmBdWorkorderService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
}

43
nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/IPdmBdWorkorderService.java

@ -1,43 +0,0 @@
package org.nl.wms.pdm.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.pdm.service.dao.PdmBdWorkorder;
import java.util.Map;
import java.util.Set;
/**
* @description 服务接口
* @author lyd
* @date 2023-05-05
**/
public interface IPdmBdWorkorderService extends IService<PdmBdWorkorder> {
/**
* 查询数据分页
* @param whereJson 条件
* @param pageable 分页参数
* @return IPage<PdmBdWorkorder>
*/
IPage<PdmBdWorkorder> queryAll(Map whereJson, PageQuery pageable);
/**
* 创建
* @param entity /
*/
void create(PdmBdWorkorder entity);
/**
* 编辑
* @param entity /
*/
void update(PdmBdWorkorder entity);
/**
* 多选删除
* @param ids /
*/
void deleteAll(Set<String> ids);
}

113
nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/PdmBdWorkorder.java

@ -1,113 +0,0 @@
package org.nl.wms.pdm.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;
import java.math.BigDecimal;
/**
* @description /
* @author lyd
* @date 2023-05-05
**/
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("pdm_bd_workorder")
public class PdmBdWorkorder implements Serializable {
private static final long serialVersionUID = 1L;
@TableId(value = "workorder_id", type = IdType.NONE)
@ApiModelProperty(value = "工单标识")
private String workorder_id;
@ApiModelProperty(value = "工单编号")
private String workorder_code;
@ApiModelProperty(value = "生产日期")
private String produce_date;
@ApiModelProperty(value = "计划数量")
private BigDecimal plan_qty;
@ApiModelProperty(value = "实际数量")
private BigDecimal real_qty;
@ApiModelProperty(value = "物料标识")
private String material_id;
@ApiModelProperty(value = "载具类型")
private String vehicle_type;
@ApiModelProperty(value = "计划开始时间")
private String planproducestart_date;
@ApiModelProperty(value = "计划结束时间")
private String planproduceend_date;
@ApiModelProperty(value = "实际开始时间")
private String realproducestart_date;
@ApiModelProperty(value = "实际结束时间")
private String realproduceend_date;
@ApiModelProperty(value = "静置时间(分钟)")
private BigDecimal standing_time;
@ApiModelProperty(value = "点位编码")
private String point_code;
@ApiModelProperty(value = "点位名称")
private String point_name;
@ApiModelProperty(value = "区域编码")
private String region_code;
@ApiModelProperty(value = "区域名称")
private String region_name;
@ApiModelProperty(value = "工单状态")
private String workorder_status;
@ApiModelProperty(value = "是否需要AGV搬运")
private String is_needmove;
@ApiModelProperty(value = "工单类型")
private String workorder_type;
@ApiModelProperty(value = "回传MES状态")
private String passback_status;
@ApiModelProperty(value = "车间编码")
private String workshop_code;
@ApiModelProperty(value = "外部标识")
private String ext_id;
@ApiModelProperty(value = "是否删除")
private Boolean is_delete;
@ApiModelProperty(value = "创建人")
private String create_id;
@ApiModelProperty(value = "创建人")
private String create_name;
@ApiModelProperty(value = "创建时间")
private String create_time;
@ApiModelProperty(value = "修改人")
private String update_id;
@ApiModelProperty(value = "修改人")
private String update_name;
@ApiModelProperty(value = "修改时间")
private String update_time;
}

12
nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/mapper/PdmBdWorkorderMapper.java

@ -1,12 +0,0 @@
package org.nl.wms.pdm.service.dao.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.nl.wms.pdm.service.dao.PdmBdWorkorder;
/**
* @author lyd
* @date 2023-05-05
**/
public interface PdmBdWorkorderMapper extends BaseMapper<PdmBdWorkorder> {
}

5
nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dao/mapper/PdmBdWorkorderMapper.xml

@ -1,5 +0,0 @@
<?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.pdm.service.dao.mapper.PdmBdWorkorderMapper">
</mapper>

101
nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dto/PdmBdWorkorderDto.java

@ -1,101 +0,0 @@
package org.nl.wms.pdm.service.dto;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @description /
* @author lyd
* @date 2023-05-05
**/
@Data
public class PdmBdWorkorderDto implements Serializable {
/** 工单标识 */
private String workorder_id;
/** 工单编号 */
private String workorder_code;
/** 生产日期 */
private String produce_date;
/** 计划数量 */
private BigDecimal plan_qty;
/** 实际数量 */
private BigDecimal real_qty;
/** 物料标识 */
private String material_id;
/** 载具类型 */
private String vehicle_type;
/** 计划开始时间 */
private String planproducestart_date;
/** 计划结束时间 */
private String planproduceend_date;
/** 实际开始时间 */
private String realproducestart_date;
/** 实际结束时间 */
private String realproduceend_date;
/** 静置时间(分钟) */
private BigDecimal standing_time;
/** 点位编码 */
private String point_code;
/** 点位名称 */
private String point_name;
/** 区域编码 */
private String region_code;
/** 区域名称 */
private String region_name;
/** 工单状态 */
private String workorder_status;
/** 是否需要AGV搬运 */
private String is_needmove;
/** 工单类型 */
private String workorder_type;
/** 回传MES状态 */
private String passback_status;
/** 车间编码 */
private String workshop_code;
/** 外部标识 */
private String ext_id;
/** 是否删除 */
private Boolean is_delete;
/** 创建人 */
private String create_id;
/** 创建人 */
private String create_name;
/** 创建时间 */
private String create_time;
/** 修改人 */
private String update_id;
/** 修改人 */
private String update_name;
/** 修改时间 */
private String update_time;
}

12
nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/dto/PdmBdWorkorderQuery.java

@ -1,12 +0,0 @@
package org.nl.wms.pdm.service.dto;
import org.nl.common.domain.query.BaseQuery;
import org.nl.wms.pdm.service.dao.PdmBdWorkorder;
/**
* @author lyd
* @date 2023-05-05
**/
public class PdmBdWorkorderQuery extends BaseQuery<PdmBdWorkorder> {
}

79
nladmin-system/nlsso-server/src/main/java/org/nl/wms/pdm/service/impl/PdmBdWorkorderServiceImpl.java

@ -1,79 +0,0 @@
package org.nl.wms.pdm.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.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.pdm.service.IPdmBdWorkorderService;
import org.nl.wms.pdm.service.dao.mapper.PdmBdWorkorderMapper;
import org.nl.wms.pdm.service.dao.PdmBdWorkorder;
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-05-05
**/
@Slf4j
@Service
public class PdmBdWorkorderServiceImpl extends ServiceImpl<PdmBdWorkorderMapper, PdmBdWorkorder> implements IPdmBdWorkorderService {
@Autowired
private PdmBdWorkorderMapper pdmBdWorkorderMapper;
@Override
public IPage<PdmBdWorkorder> queryAll(Map whereJson, PageQuery page){
LambdaQueryWrapper<PdmBdWorkorder> lam = new LambdaQueryWrapper<>();
IPage<PdmBdWorkorder> pages = new Page<>(page.getPage() + 1, page.getSize());
pdmBdWorkorderMapper.selectPage(pages, lam);
return pages;
}
@Override
public void create(PdmBdWorkorder entity) {
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
entity.setWorkorder_id(IdUtil.getSnowflake(1, 1).nextIdStr());
entity.setCreate_id(currentUserId);
entity.setCreate_name(nickName);
entity.setCreate_time(now);
entity.setUpdate_id(currentUserId);
entity.setUpdate_name(nickName);
entity.setUpdate_time(now);
pdmBdWorkorderMapper.insert(entity);
}
@Override
public void update(PdmBdWorkorder entity) {
PdmBdWorkorder dto = pdmBdWorkorderMapper.selectById(entity.getWorkorder_id());
if (dto == null) throw new BadRequestException("被删除或无权限,操作失败!");
String currentUserId = SecurityUtils.getCurrentUserId();
String nickName = SecurityUtils.getCurrentNickName();
String now = DateUtil.now();
entity.setUpdate_id(currentUserId);
entity.setUpdate_name(nickName);
entity.setUpdate_time(now);
pdmBdWorkorderMapper.updateById(entity);
}
@Override
public void deleteAll(Set<String> ids) {
// 真删除
pdmBdWorkorderMapper.deleteBatchIds(ids);
}
}
Loading…
Cancel
Save