基础资料优化调整

main
HUOJIN\92525 2024-06-13 15:11:23 +08:00
parent 82c5ba51c0
commit 023be453bf
26 changed files with 788 additions and 173 deletions

View File

@ -1,40 +1,42 @@
/* /*
* Copyright 2019-2020 Zheng Jie * Copyright 2019-2020 Zheng Jie
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.youchain.basicdata.domain; package com.youchain.basicdata.domain;
import com.youchain.base.BaseEntity; import com.youchain.base.BaseEntity;
import com.youchain.modules.system.domain.Dept;
import lombok.Data; import lombok.Data;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*; import javax.persistence.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @website https://eladmin.vip * @author shenyinan
* @description / * @website https://eladmin.vip
* @author shenyinan * @description /
* @date 2024-02-21 * @date 2024-02-21
**/ **/
@Entity @Entity
@Data @Data
@Table(name="base_big_item") @Table(name = "base_big_item")
public class BigItem extends BaseEntity implements Serializable { public class BigItem extends BaseEntity implements Serializable {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
@ -58,12 +60,13 @@ public class BigItem extends BaseEntity implements Serializable {
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remark; private String remark;
@Column(name = "`dept_id`") @OneToOne
@ApiModelProperty(value = "仓库ID") @JoinColumn(name = "dept_id")
private Long deptId; @ApiModelProperty(value = "仓库")
private Dept dept;
public void copy(BigItem source){ public void copy(BigItem source) {
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
} }
} }

View File

@ -0,0 +1,86 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.youchain.basicdata.domain;
import com.youchain.base.BaseEntity;
import com.youchain.modules.system.domain.Dept;
import lombok.Data;
import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*;
import javax.validation.constraints.*;
import java.sql.Timestamp;
import java.io.Serializable;
/**
* @author huojin
* @website https://eladmin.vip
* @description /
* @date 2024-06-13
**/
@Entity
@Data
@Table(name = "base_package_check")
public class PackageCheck extends BaseEntity implements Serializable {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "`id`")
@ApiModelProperty(value = "ID")
private Long id;
@Column(name = "`code`", unique = true, nullable = false)
@NotBlank
@ApiModelProperty(value = "成套代码")
private String code;
@OneToOne
@JoinColumn(name = "`item_id`", nullable = false)
@NotNull
@ApiModelProperty(value = "物料")
private Item item;
@OneToOne
@JoinColumn(name = "dept_id")
@ApiModelProperty(value = "仓库")
private Dept dept;
@Column(name = "`quantity`")
@ApiModelProperty(value = "套数")
private Double quantity;
@Column(name = "`create_by`")
@ApiModelProperty(value = "创建人")
private String createBy;
@Column(name = "`update_by`")
@ApiModelProperty(value = "修改人")
private String updateBy;
@Column(name = "`create_time`")
@ApiModelProperty(value = "创建时间")
private Timestamp createTime;
@Column(name = "`update_time`")
@ApiModelProperty(value = "修改时间")
private Timestamp updateTime;
public void copy(PackageCheck source) {
BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
}
}

View File

@ -1,18 +1,18 @@
/* /*
* Copyright 2019-2020 Zheng Jie * Copyright 2019-2020 Zheng Jie
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.youchain.basicdata.domain; package com.youchain.basicdata.domain;
import com.youchain.base.BaseEntity; import com.youchain.base.BaseEntity;
@ -20,21 +20,22 @@ import lombok.Data;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import cn.hutool.core.bean.copier.CopyOptions; import cn.hutool.core.bean.copier.CopyOptions;
import javax.persistence.*; import javax.persistence.*;
import javax.validation.constraints.*; import javax.validation.constraints.*;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @website https://eladmin.vip * @author dengjiangkun
* @description / * @website https://eladmin.vip
* @author dengjiangkun * @description /
* @date 2023-12-15 * @date 2023-12-15
**/ **/
@Entity @Entity
@Data @Data
@Table(name="base_zcjxb") @Table(name = "base_zcjxb")
public class Zcjxb extends BaseEntity implements Serializable { public class Zcjxb extends BaseEntity implements Serializable {
@Id @Id
@GeneratedValue(strategy = GenerationType.IDENTITY) @GeneratedValue(strategy = GenerationType.IDENTITY)
@ -42,27 +43,27 @@ public class Zcjxb extends BaseEntity implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private Long id; private Long id;
@Column(name = "`code`",nullable = false) @Column(name = "`code`", nullable = false)
@NotNull @NotNull
@ApiModelProperty(value = "机械臂机台号") @ApiModelProperty(value = "机械臂机台号")
private Integer code; private Integer code;
@Column(name = "`ip`",nullable = false) @Column(name = "`ip`", nullable = false)
@NotBlank @NotBlank
@ApiModelProperty(value = "ip地址") @ApiModelProperty(value = "ip地址")
private String ip; private String ip;
@Column(name = "`port`",nullable = false) @Column(name = "`port`", nullable = false)
@NotNull @NotNull
@ApiModelProperty(value = "端口号") @ApiModelProperty(value = "端口号")
private Integer port; private Integer port;
@Column(name = "`communication_type`",nullable = false) @Column(name = "`communication_type`", nullable = false)
@NotBlank @NotBlank
@ApiModelProperty(value = "通信类型") @ApiModelProperty(value = "通信类型")
private String communicationType; private String communicationType;
@Column(name = "`address`",nullable = false) @Column(name = "`address`", nullable = false)
@NotNull @NotNull
@ApiModelProperty(value = "DB地址") @ApiModelProperty(value = "DB地址")
private Integer address; private Integer address;
@ -150,7 +151,7 @@ public class Zcjxb extends BaseEntity implements Serializable {
@ApiModelProperty(value = "异常日志") @ApiModelProperty(value = "异常日志")
private String errorTxt; private String errorTxt;
public void copy(Zcjxb source){ public void copy(Zcjxb source) {
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
} }
} }

View File

@ -0,0 +1,34 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.youchain.basicdata.repository;
import com.youchain.basicdata.domain.PackageCheck;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
/**
* @website https://eladmin.vip
* @author huojin
* @date 2024-06-13
**/
public interface PackageCheckRepository extends JpaRepository<PackageCheck, Long>, JpaSpecificationExecutor<PackageCheck> {
/**
* Code
* @param code /
* @return /
*/
PackageCheck findByCode(String code);
}

View File

@ -19,6 +19,7 @@ import com.youchain.annotation.Log;
import com.youchain.basicdata.domain.AgvScene; import com.youchain.basicdata.domain.AgvScene;
import com.youchain.basicdata.service.AgvSceneService; import com.youchain.basicdata.service.AgvSceneService;
import com.youchain.basicdata.service.dto.AgvSceneQueryCriteria; import com.youchain.basicdata.service.dto.AgvSceneQueryCriteria;
import com.youchain.utils.UserUtils;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
@ -69,6 +70,7 @@ public class AgvSceneController {
@ApiOperation("新增agv_scene") @ApiOperation("新增agv_scene")
@PreAuthorize("@el.check('agvScene:add')") @PreAuthorize("@el.check('agvScene:add')")
public ResponseEntity<Object> createAgvScene(@Validated @RequestBody AgvScene resources){ public ResponseEntity<Object> createAgvScene(@Validated @RequestBody AgvScene resources){
resources.setDept(UserUtils.getDept());
return new ResponseEntity<>(agvSceneService.create(resources),HttpStatus.CREATED); return new ResponseEntity<>(agvSceneService.create(resources),HttpStatus.CREATED);
} }

View File

@ -19,6 +19,7 @@ import com.youchain.annotation.Log;
import com.youchain.basicdata.domain.BigBom; import com.youchain.basicdata.domain.BigBom;
import com.youchain.basicdata.service.BigBomService; import com.youchain.basicdata.service.BigBomService;
import com.youchain.basicdata.service.dto.BigBomQueryCriteria; import com.youchain.basicdata.service.dto.BigBomQueryCriteria;
import com.youchain.utils.UserUtils;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
@ -62,6 +63,7 @@ public class BigBomController {
@ApiOperation("新增bigBom") @ApiOperation("新增bigBom")
@PreAuthorize("@el.check('bigBom:add')") @PreAuthorize("@el.check('bigBom:add')")
public ResponseEntity<Object> createBigBom(@Validated @RequestBody BigBom resources){ public ResponseEntity<Object> createBigBom(@Validated @RequestBody BigBom resources){
resources.setDept(UserUtils.getDept());
return new ResponseEntity<>(bigBomService.create(resources),HttpStatus.CREATED); return new ResponseEntity<>(bigBomService.create(resources),HttpStatus.CREATED);
} }

View File

@ -1,24 +1,25 @@
/* /*
* Copyright 2019-2020 Zheng Jie * Copyright 2019-2020 Zheng Jie
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.youchain.basicdata.rest; package com.youchain.basicdata.rest;
import com.youchain.annotation.Log; import com.youchain.annotation.Log;
import com.youchain.basicdata.domain.BigItem; import com.youchain.basicdata.domain.BigItem;
import com.youchain.basicdata.service.BigItemService; import com.youchain.basicdata.service.BigItemService;
import com.youchain.basicdata.service.dto.BigItemQueryCriteria; import com.youchain.basicdata.service.dto.BigItemQueryCriteria;
import com.youchain.utils.UserUtils;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
@ -27,14 +28,15 @@ import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import java.io.IOException; import java.io.IOException;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
/** /**
* @website https://eladmin.vip * @author shenyinan
* @author shenyinan * @website https://eladmin.vip
* @date 2024-02-21 * @date 2024-02-21
**/ **/
@RestController @RestController
@RequiredArgsConstructor @RequiredArgsConstructor
@Api(tags = "bigitem管理") @Api(tags = "bigitem管理")
@ -53,29 +55,30 @@ public class BigItemController {
@GetMapping @GetMapping
@ApiOperation("查询bigitem") @ApiOperation("查询bigitem")
public ResponseEntity<Object> queryBigItem(BigItemQueryCriteria criteria, Pageable pageable){ public ResponseEntity<Object> queryBigItem(BigItemQueryCriteria criteria, Pageable pageable) {
return new ResponseEntity<>(bigItemService.queryAll(criteria,pageable),HttpStatus.OK); return new ResponseEntity<>(bigItemService.queryAll(criteria, pageable), HttpStatus.OK);
} }
@GetMapping("/All") @GetMapping("/All")
@ApiOperation("查询所有bigitem") @ApiOperation("查询所有bigitem")
public ResponseEntity<Object> queryAllBigItem(BigItemQueryCriteria criteria){ public ResponseEntity<Object> queryAllBigItem(BigItemQueryCriteria criteria) {
return new ResponseEntity<>(bigItemService.queryAll(criteria),HttpStatus.OK); return new ResponseEntity<>(bigItemService.queryAll(criteria), HttpStatus.OK);
} }
@PostMapping @PostMapping
@Log("新增bigitem") @Log("新增bigitem")
@ApiOperation("新增bigitem") @ApiOperation("新增bigitem")
@PreAuthorize("@el.check('bigItem:add')") @PreAuthorize("@el.check('bigItem:add')")
public ResponseEntity<Object> createBigItem(@Validated @RequestBody BigItem resources){ public ResponseEntity<Object> createBigItem(@Validated @RequestBody BigItem resources) {
return new ResponseEntity<>(bigItemService.create(resources),HttpStatus.CREATED); resources.setDept(UserUtils.getDept());
return new ResponseEntity<>(bigItemService.create(resources), HttpStatus.CREATED);
} }
@PutMapping @PutMapping
@Log("修改bigitem") @Log("修改bigitem")
@ApiOperation("修改bigitem") @ApiOperation("修改bigitem")
@PreAuthorize("@el.check('bigItem:edit')") @PreAuthorize("@el.check('bigItem:edit')")
public ResponseEntity<Object> updateBigItem(@Validated @RequestBody BigItem resources){ public ResponseEntity<Object> updateBigItem(@Validated @RequestBody BigItem resources) {
bigItemService.update(resources); bigItemService.update(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT); return new ResponseEntity<>(HttpStatus.NO_CONTENT);
} }

View File

@ -19,6 +19,7 @@ import com.youchain.annotation.Log;
import com.youchain.basicdata.domain.BillType; import com.youchain.basicdata.domain.BillType;
import com.youchain.basicdata.service.BillTypeService; import com.youchain.basicdata.service.BillTypeService;
import com.youchain.basicdata.service.dto.BillTypeQueryCriteria; import com.youchain.basicdata.service.dto.BillTypeQueryCriteria;
import com.youchain.utils.UserUtils;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
@ -62,6 +63,7 @@ public class BillTypeController {
@ApiOperation("新增bill_type") @ApiOperation("新增bill_type")
@PreAuthorize("@el.check('billType:add')") @PreAuthorize("@el.check('billType:add')")
public ResponseEntity<Object> createBillType(@Validated @RequestBody BillType resources){ public ResponseEntity<Object> createBillType(@Validated @RequestBody BillType resources){
resources.setDept(UserUtils.getDept());
return new ResponseEntity<>(billTypeService.create(resources),HttpStatus.CREATED); return new ResponseEntity<>(billTypeService.create(resources),HttpStatus.CREATED);
} }

View File

@ -50,10 +50,6 @@ public class BoxController {
private final BoxService boxService; private final BoxService boxService;
private final CodeUtils codeUtils;
@Log("导出数据") @Log("导出数据")
@ApiOperation("导出数据") @ApiOperation("导出数据")
@GetMapping(value = "/download") @GetMapping(value = "/download")

View File

@ -19,6 +19,7 @@ import com.youchain.annotation.Log;
import com.youchain.basicdata.domain.CarReg; import com.youchain.basicdata.domain.CarReg;
import com.youchain.basicdata.service.CarRegService; import com.youchain.basicdata.service.CarRegService;
import com.youchain.basicdata.service.dto.CarRegQueryCriteria; import com.youchain.basicdata.service.dto.CarRegQueryCriteria;
import com.youchain.utils.UserUtils;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;

View File

@ -0,0 +1,89 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.youchain.basicdata.rest;
import com.youchain.annotation.Log;
import com.youchain.basicdata.domain.PackageCheck;
import com.youchain.basicdata.service.PackageCheckService;
import com.youchain.basicdata.service.dto.PackageCheckQueryCriteria;
import com.youchain.utils.UserUtils;
import org.springframework.data.domain.Pageable;
import lombok.RequiredArgsConstructor;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import io.swagger.annotations.*;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
/**
* @author huojin
* @website https://eladmin.vip
* @date 2024-06-13
**/
@RestController
@RequiredArgsConstructor
@Api(tags = "package_check管理")
@RequestMapping("/api/packageCheck")
public class PackageCheckController {
private final PackageCheckService packageCheckService;
@Log("导出数据")
@ApiOperation("导出数据")
@GetMapping(value = "/download")
@PreAuthorize("@el.check('packageCheck:list')")
public void exportPackageCheck(HttpServletResponse response, PackageCheckQueryCriteria criteria) throws IOException {
packageCheckService.download(packageCheckService.queryAll(criteria), response);
}
@GetMapping
@ApiOperation("查询package_check")
@PreAuthorize("@el.check('packageCheck:list')")
public ResponseEntity<Object> queryPackageCheck(PackageCheckQueryCriteria criteria, Pageable pageable) {
return new ResponseEntity<>(packageCheckService.queryAll(criteria, pageable), HttpStatus.OK);
}
@PostMapping
@Log("新增package_check")
@ApiOperation("新增package_check")
@PreAuthorize("@el.check('packageCheck:add')")
public ResponseEntity<Object> createPackageCheck(@Validated @RequestBody PackageCheck resources) {
resources.setDept(UserUtils.getDept());
return new ResponseEntity<>(packageCheckService.create(resources), HttpStatus.CREATED);
}
@PutMapping
@Log("修改package_check")
@ApiOperation("修改package_check")
@PreAuthorize("@el.check('packageCheck:edit')")
public ResponseEntity<Object> updatePackageCheck(@Validated @RequestBody PackageCheck resources) {
packageCheckService.update(resources);
return new ResponseEntity<>(HttpStatus.NO_CONTENT);
}
@DeleteMapping
@Log("删除package_check")
@ApiOperation("删除package_check")
@PreAuthorize("@el.check('packageCheck:del')")
public ResponseEntity<Object> deletePackageCheck(@RequestBody Long[] ids) {
packageCheckService.deleteAll(ids);
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@ -0,0 +1,83 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.youchain.basicdata.service;
import com.youchain.basicdata.domain.PackageCheck;
import com.youchain.basicdata.service.dto.PackageCheckDto;
import com.youchain.basicdata.service.dto.PackageCheckQueryCriteria;
import org.springframework.data.domain.Pageable;
import java.util.Map;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
/**
* @website https://eladmin.vip
* @description
* @author huojin
* @date 2024-06-13
**/
public interface PackageCheckService {
/**
*
* @param criteria
* @param pageable
* @return Map<String,Object>
*/
Map<String,Object> queryAll(PackageCheckQueryCriteria criteria, Pageable pageable);
/**
*
* @param criteria
* @return List<PackageCheckDto>
*/
List<PackageCheckDto> queryAll(PackageCheckQueryCriteria criteria);
/**
* ID
* @param id ID
* @return PackageCheckDto
*/
PackageCheckDto findById(Long id);
/**
*
* @param resources /
* @return PackageCheckDto
*/
PackageCheckDto create(PackageCheck resources);
/**
*
* @param resources /
*/
void update(PackageCheck resources);
/**
*
* @param ids /
*/
void deleteAll(Long[] ids);
/**
*
* @param all
* @param response /
* @throws IOException /
*/
void download(List<PackageCheckDto> all, HttpServletResponse response) throws IOException;
}

View File

@ -1,58 +1,75 @@
/* /*
* Copyright 2019-2020 Zheng Jie * Copyright 2019-2020 Zheng Jie
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.youchain.basicdata.service.dto; package com.youchain.basicdata.service.dto;
import com.youchain.basicdata.domain.BigItem; import com.youchain.basicdata.domain.BigItem;
import com.youchain.basicdata.domain.Item; import com.youchain.basicdata.domain.Item;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @website https://eladmin.vip * @author shenyinan
* @description / * @website https://eladmin.vip
* @author shenyinan * @description /
* @date 2024-02-21 * @date 2024-02-21
**/ **/
@Data @Data
public class BigBomDto implements Serializable { public class BigBomDto implements Serializable {
private Long id; private Long id;
/** bigitemID */ /**
* bigitemID
*/
private BigItem bigItem; private BigItem bigItem;
/** itemID */ /**
* itemID
*/
private Item item; private Item item;
/** 数量 */ /**
*
*/
private Float quantity; private Float quantity;
/** 仓库ID */ /**
* ID
*/
private Long deptId; private Long deptId;
/** 创建人 */ /**
*
*/
private String createBy; private String createBy;
/** 修改人 */ /**
*
*/
private String updateBy; private String updateBy;
/** 创建时间 */ /**
*
*/
private Timestamp createTime; private Timestamp createTime;
/** 修改时间 */ /**
*
*/
private Timestamp updateTime; private Timestamp updateTime;
} }

View File

@ -1,29 +1,43 @@
/* /*
* Copyright 2019-2020 Zheng Jie * Copyright 2019-2020 Zheng Jie
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.youchain.basicdata.service.dto; package com.youchain.basicdata.service.dto;
import lombok.Data; import lombok.Data;
import java.util.List; import java.util.List;
import com.youchain.annotation.Query; import com.youchain.annotation.Query;
/** /**
* @website https://eladmin.vip * @author shenyinan
* @author shenyinan * @website https://eladmin.vip
* @date 2024-02-21 * @date 2024-02-21
**/ **/
@Data @Data
public class BigBomQueryCriteria{ public class BigBomQueryCriteria {
} /**
*
*/
@Query(propName = "code", joinName = "item")
private String itemCode;
/**
*
*/
@Query(propName = "code", joinName = "bigItem")
private String bigItemCode;
}

View File

@ -15,6 +15,7 @@
*/ */
package com.youchain.basicdata.service.dto; package com.youchain.basicdata.service.dto;
import com.youchain.modules.system.service.dto.DeptSmallDto;
import lombok.Data; import lombok.Data;
import java.sql.Timestamp; import java.sql.Timestamp;
import java.io.Serializable; import java.io.Serializable;
@ -43,7 +44,7 @@ public class BigItemDto implements Serializable {
private String remark; private String remark;
/** 仓库ID */ /** 仓库ID */
private Long deptId; private DeptSmallDto dept;
/** 创建人 */ /** 创建人 */
private String createBy; private String createBy;
@ -56,4 +57,4 @@ public class BigItemDto implements Serializable {
/** 修改时间 */ /** 修改时间 */
private Timestamp updateTime; private Timestamp updateTime;
} }

View File

@ -26,4 +26,11 @@ import com.youchain.annotation.Query;
**/ **/
@Data @Data
public class BigItemQueryCriteria{ public class BigItemQueryCriteria{
} /** 代码 */
@Query(type = Query.Type.INNER_LIKE)
private String code;
/** 名称 */
@Query(type = Query.Type.INNER_LIKE)
private String name;
}

View File

@ -0,0 +1,82 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.youchain.basicdata.service.dto;
import com.youchain.modules.system.service.dto.DeptDto;
import com.youchain.modules.system.service.dto.DeptSmallDto;
import lombok.Data;
import java.sql.Timestamp;
import java.io.Serializable;
import com.alibaba.fastjson.annotation.JSONField;
import com.alibaba.fastjson.serializer.ToStringSerializer;
/**
* @author huojin
* @website https://eladmin.vip
* @description /
* @date 2024-06-13
**/
@Data
public class PackageCheckDto implements Serializable {
/**
*
*/
@JSONField(serializeUsing = ToStringSerializer.class)
private Long id;
/**
*
*/
private String code;
/**
*
*/
private ItemDto item;
/**
*
*/
private DeptDto dept;
/**
*
*/
private Double quantity;
/**
*
*/
private String createBy;
/**
*
*/
private String updateBy;
/**
*
*/
private Timestamp createTime;
/**
*
*/
private Timestamp updateTime;
}

View File

@ -0,0 +1,42 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.youchain.basicdata.service.dto;
import lombok.Data;
import java.util.List;
import com.youchain.annotation.Query;
/**
* @author huojin
* @website https://eladmin.vip
* @date 2024-06-13
**/
@Data
public class PackageCheckQueryCriteria {
/**
*
*/
@Query(type = Query.Type.INNER_LIKE)
private String code;
/**
*
*/
@Query(propName = "code", joinName = "item")
private String itemCode;
}

View File

@ -1,18 +1,18 @@
/* /*
* Copyright 2019-2020 Zheng Jie * Copyright 2019-2020 Zheng Jie
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
* *
* http://www.apache.org/licenses/LICENSE-2.0 * http://www.apache.org/licenses/LICENSE-2.0
* *
* Unless required by applicable law or agreed to in writing, software * Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package com.youchain.basicdata.service.impl; package com.youchain.basicdata.service.impl;
import com.youchain.basicdata.domain.BigItem; import com.youchain.basicdata.domain.BigItem;
@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Page; import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Pageable;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.io.IOException; import java.io.IOException;
@ -38,11 +39,11 @@ import java.util.ArrayList;
import java.util.LinkedHashMap; import java.util.LinkedHashMap;
/** /**
* @website https://eladmin.vip * @author shenyinan
* @description * @website https://eladmin.vip
* @author shenyinan * @description
* @date 2024-02-21 * @date 2024-02-21
**/ **/
@Service @Service
@RequiredArgsConstructor @RequiredArgsConstructor
public class BigItemServiceImpl implements BigItemService { public class BigItemServiceImpl implements BigItemService {
@ -51,21 +52,21 @@ public class BigItemServiceImpl implements BigItemService {
private final BigItemMapper bigItemMapper; private final BigItemMapper bigItemMapper;
@Override @Override
public Map<String,Object> queryAll(BigItemQueryCriteria criteria, Pageable pageable){ public Map<String, Object> queryAll(BigItemQueryCriteria criteria, Pageable pageable) {
Page<BigItem> page = bigItemRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); Page<BigItem> page = bigItemRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder), pageable);
return PageUtil.toPage(page.map(bigItemMapper::toDto)); return PageUtil.toPage(page.map(bigItemMapper::toDto));
} }
@Override @Override
public List<BigItemDto> queryAll(BigItemQueryCriteria criteria){ public List<BigItemDto> queryAll(BigItemQueryCriteria criteria) {
return bigItemMapper.toDto(bigItemRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); return bigItemMapper.toDto(bigItemRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder)));
} }
@Override @Override
@Transactional @Transactional
public BigItemDto findById(Long id) { public BigItemDto findById(Long id) {
BigItem bigItem = bigItemRepository.findById(id).orElseGet(BigItem::new); BigItem bigItem = bigItemRepository.findById(id).orElseGet(BigItem::new);
ValidationUtil.isNull(bigItem.getId(),"BigItem","id",id); ValidationUtil.isNull(bigItem.getId(), "BigItem", "id", id);
return bigItemMapper.toDto(bigItem); return bigItemMapper.toDto(bigItem);
} }
@ -79,7 +80,7 @@ public class BigItemServiceImpl implements BigItemService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void update(BigItem resources) { public void update(BigItem resources) {
BigItem bigItem = bigItemRepository.findById(resources.getId()).orElseGet(BigItem::new); BigItem bigItem = bigItemRepository.findById(resources.getId()).orElseGet(BigItem::new);
ValidationUtil.isNull( bigItem.getId(),"BigItem","id",resources.getId()); ValidationUtil.isNull(bigItem.getId(), "BigItem", "id", resources.getId());
bigItem.copy(resources); bigItem.copy(resources);
bigItemRepository.save(bigItem); bigItemRepository.save(bigItem);
} }
@ -95,12 +96,12 @@ public class BigItemServiceImpl implements BigItemService {
public void download(List<BigItemDto> all, HttpServletResponse response) throws IOException { public void download(List<BigItemDto> all, HttpServletResponse response) throws IOException {
List<Map<String, Object>> list = new ArrayList<>(); List<Map<String, Object>> list = new ArrayList<>();
for (BigItemDto bigItem : all) { for (BigItemDto bigItem : all) {
Map<String,Object> map = new LinkedHashMap<>(); Map<String, Object> map = new LinkedHashMap<>();
map.put("代码", bigItem.getCode()); map.put("代码", bigItem.getCode());
map.put("名称", bigItem.getName()); map.put("名称", bigItem.getName());
map.put("类型", bigItem.getType()); map.put("类型", bigItem.getType());
map.put("备注", bigItem.getRemark()); map.put("备注", bigItem.getRemark());
map.put("仓库ID", bigItem.getDeptId()); map.put("仓库", bigItem.getDept().getName());
map.put("创建人", bigItem.getCreateBy()); map.put("创建人", bigItem.getCreateBy());
map.put("修改人", bigItem.getUpdateBy()); map.put("修改人", bigItem.getUpdateBy());
map.put("创建时间", bigItem.getCreateTime()); map.put("创建时间", bigItem.getCreateTime());
@ -109,4 +110,4 @@ public class BigItemServiceImpl implements BigItemService {
} }
FileUtil.downloadExcel(list, response); FileUtil.downloadExcel(list, response);
} }
} }

View File

@ -0,0 +1,112 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.youchain.basicdata.service.impl;
import com.youchain.basicdata.domain.PackageCheck;
import com.youchain.utils.FileUtil;
import com.youchain.utils.PageUtil;
import com.youchain.utils.QueryHelp;
import com.youchain.utils.ValidationUtil;
import lombok.RequiredArgsConstructor;
import com.youchain.basicdata.repository.PackageCheckRepository;
import com.youchain.basicdata.service.PackageCheckService;
import com.youchain.basicdata.service.dto.PackageCheckDto;
import com.youchain.basicdata.service.dto.PackageCheckQueryCriteria;
import com.youchain.basicdata.service.mapstruct.PackageCheckMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import java.util.List;
import java.util.Map;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.LinkedHashMap;
/**
* @author huojin
* @website https://eladmin.vip
* @description
* @date 2024-06-13
**/
@Service
@RequiredArgsConstructor
public class PackageCheckServiceImpl implements PackageCheckService {
private final PackageCheckRepository packageCheckRepository;
private final PackageCheckMapper packageCheckMapper;
@Override
public Map<String, Object> queryAll(PackageCheckQueryCriteria criteria, Pageable pageable) {
Page<PackageCheck> page = packageCheckRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder), pageable);
return PageUtil.toPage(page.map(packageCheckMapper::toDto));
}
@Override
public List<PackageCheckDto> queryAll(PackageCheckQueryCriteria criteria) {
return packageCheckMapper.toDto(packageCheckRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder)));
}
@Override
@Transactional
public PackageCheckDto findById(Long id) {
PackageCheck packageCheck = packageCheckRepository.findById(id).orElseGet(PackageCheck::new);
ValidationUtil.isNull(packageCheck.getId(), "PackageCheck", "id", id);
return packageCheckMapper.toDto(packageCheck);
}
@Override
@Transactional(rollbackFor = Exception.class)
public PackageCheckDto create(PackageCheck resources) {
return packageCheckMapper.toDto(packageCheckRepository.save(resources));
}
@Override
@Transactional(rollbackFor = Exception.class)
public void update(PackageCheck resources) {
PackageCheck packageCheck = packageCheckRepository.findById(resources.getId()).orElseGet(PackageCheck::new);
ValidationUtil.isNull(packageCheck.getId(), "PackageCheck", "id", resources.getId());
packageCheck.copy(resources);
packageCheckRepository.save(packageCheck);
}
@Override
public void deleteAll(Long[] ids) {
for (Long id : ids) {
packageCheckRepository.deleteById(id);
}
}
@Override
public void download(List<PackageCheckDto> all, HttpServletResponse response) throws IOException {
List<Map<String, Object>> list = new ArrayList<>();
for (PackageCheckDto packageCheck : all) {
Map<String, Object> map = new LinkedHashMap<>();
map.put("成套代码", packageCheck.getCode());
map.put("物料", packageCheck.getItem().getCode());
map.put("套数", packageCheck.getQuantity());
map.put("创建人", packageCheck.getCreateBy());
map.put("修改人", packageCheck.getUpdateBy());
map.put("创建时间", packageCheck.getCreateTime());
map.put("修改时间", packageCheck.getUpdateTime());
list.add(map);
}
FileUtil.downloadExcel(list, response);
}
}

View File

@ -274,14 +274,14 @@ public class StockServiceImpl implements StockService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void bindContainer(String QRCode, String stockCode, String pointCode) { public void bindContainer(String QRCode, String stockCode, String pointCode) {
Map<String, String> map = parseString(QRCode); Map<String, String> map = parseString(QRCode);//解析二维码
String propC1 = map.get("Lot");//批次号 String propC1 = map.get("Lot");//批次号
String gdh = map.get("S");//工单 String boxNumber = map.get("S");//箱
String propC3 = map.get("P");//工厂 String propC3 = map.get("P");//工厂
String propD1 = map.get("D");//生产日期 String propD1 = map.get("D");//生产日期
double orderQty = Double.parseDouble(getStringCode(map.get("Q")));//数量 double orderQty = Double.parseDouble(getStringCode(map.get("Q")));//数量
if (asnDetailService.findByMo(QRCode)) { if (asnDetailService.existsByboxNumber(boxNumber)) {
throw new RuntimeException("该MO票已入库,请勿重复操作!"); throw new RuntimeException(boxNumber + "箱号已入库,请勿重复操作!");
} }
Item item = validateItem(getStringCode(map.get("M")));//验证物料 Item item = validateItem(getStringCode(map.get("M")));//验证物料
Stock stock = validateStock(stockCode);//验证容器 Stock stock = validateStock(stockCode);//验证容器
@ -304,10 +304,10 @@ public class StockServiceImpl implements StockService {
Point endPoint = validateEndPoint(item, areaName);//验证目标点位 Point endPoint = validateEndPoint(item, areaName);//验证目标点位
checkPointStatus(srcPoint);//验证源点位状态 checkPointStatus(srcPoint);//验证源点位状态
AgvTask agvTask = createAndSendAgvTask(BizStatus.ASN, stock, srcPoint, endPoint);//生成AGV任务 AgvTask agvTask = createAndSendAgvTask(BizStatus.ASN, stock, srcPoint, endPoint);//生成AGV任务
AsnDetail asnDetail = asnDetailService.createAsnDetail(item, stock, srcPoint, propC1, gdh, propC3, Timestamp.valueOf(DateUtil.formatDateTime(DateUtil.parse(propD1))), orderQty, QRCode); AsnDetail asnDetail = asnDetailService.createAsnDetail(item, stock, srcPoint, propC1, boxNumber, propC3, Timestamp.valueOf(DateUtil.formatDateTime(DateUtil.parse(propD1))), orderQty, QRCode);
ItemKey itemKey = itemKeyService.getItemKey(item, asnDetail.getPropC1(), asnDetail.getOrderNumber());//生成Itemkey ItemKey itemKey = itemKeyService.getItemKey(item, asnDetail.getPropC1(), asnDetail.getOrderNumber());//生成Itemkey
createTask(item, itemKey, asnDetail, stock, srcPoint, endPoint, agvTask);//生成Task任务 createTask(item, itemKey, asnDetail, stock, srcPoint, endPoint, agvTask);//生成Task任务
updateStockAndPoints(stock, srcPoint, endPoint); updateStockAndPoints(stock, srcPoint, endPoint);//更新容器和点位状态
} }
private void validateStockAndItem(Stock stock, Item item) { private void validateStockAndItem(Stock stock, Item item) {

View File

@ -0,0 +1,32 @@
/*
* Copyright 2019-2020 Zheng Jie
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.youchain.basicdata.service.mapstruct;
import com.youchain.base.BaseMapper;
import com.youchain.basicdata.domain.PackageCheck;
import com.youchain.basicdata.service.dto.PackageCheckDto;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
/**
* @website https://eladmin.vip
* @author huojin
* @date 2024-06-13
**/
@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface PackageCheckMapper extends BaseMapper<PackageCheckDto, PackageCheck> {
}

View File

@ -117,5 +117,10 @@ public interface AsnDetailService {
*/ */
AsnDetail createAsnDetail(Item item, Stock stock); AsnDetail createAsnDetail(Item item, Stock stock);
boolean findByMo(String Mo); /**
* MoAsnDetail
* @param boxNumber
* @return
*/
boolean existsByboxNumber(String boxNumber);
} }

View File

@ -233,9 +233,10 @@ public class AsnDetailServiceImpl implements AsnDetailService {
} }
@Override @Override
public boolean findByMo(String Mo) { public boolean existsByboxNumber(String boxNumber) {
String hql = " from AsnDetail ad where ad.po='" + Mo + "' "; String hql = " from AsnDetail ad where ad.orderNumber=:boxNumber ";
Query query = entityMapper.createQuery(hql); Query query = entityMapper.createQuery(hql);
query.setParameter("boxNumber", boxNumber);
List<AsnDetail> asnDetailList = query.getResultList(); List<AsnDetail> asnDetailList = query.getResultList();
if (asnDetailList.size() > 0) { if (asnDetailList.size() > 0) {
return true; return true;

View File

@ -19,7 +19,6 @@ public class UserUtils {
}else{ }else{
dept.setId(0L); dept.setId(0L);
} }
log.error(JSONUtil.toJsonStr("用户仓库ID"+dept.getId()));
return dept; return dept;
} }
} }

View File

@ -30,7 +30,7 @@ spring:
redis: redis:
#数据库索引 #数据库索引
database: ${REDIS_DB:1} database: ${REDIS_DB:2}
#host: ${REDIS_HOST:115.159.67.99} #host: ${REDIS_HOST:115.159.67.99}
#password: ${REDIS_PWD:123456} #password: ${REDIS_PWD:123456}
#port: ${REDIS_PORT:6380} #port: ${REDIS_PORT:6380}