add:库存查询,WebService接口对接
This commit is contained in:
23
lms/.idea/fastRequestCollection.xml
generated
Normal file
23
lms/.idea/fastRequestCollection.xml
generated
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="fastRequestCollection">
|
||||||
|
<option name="detail">
|
||||||
|
<CollectionDetail>
|
||||||
|
<option name="childList">
|
||||||
|
<list>
|
||||||
|
<CollectionDetail>
|
||||||
|
<option name="groupId" value="1" />
|
||||||
|
<option name="id" value="1" />
|
||||||
|
<option name="name" value="Default Group" />
|
||||||
|
<option name="type" value="1" />
|
||||||
|
</CollectionDetail>
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
|
<option name="groupId" value="-1" />
|
||||||
|
<option name="id" value="0" />
|
||||||
|
<option name="name" value="Root" />
|
||||||
|
<option name="type" value="1" />
|
||||||
|
</CollectionDetail>
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
8
lms/.idea/fastRequestCurrentProjectConfig.xml
generated
Normal file
8
lms/.idea/fastRequestCurrentProjectConfig.xml
generated
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="fastRequestCurrentProjectConfig">
|
||||||
|
<option name="domain" value="localhost:8011" />
|
||||||
|
<option name="enableEnv" value="dev" />
|
||||||
|
<option name="enableProject" value="community" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
5
lms/.idea/lms.iml
generated
5
lms/.idea/lms.iml
generated
@@ -1,5 +1,10 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<module type="JAVA_MODULE" version="4">
|
<module type="JAVA_MODULE" version="4">
|
||||||
|
<component name="CheckStyle-IDEA-Module">
|
||||||
|
<option name="configuration">
|
||||||
|
<map />
|
||||||
|
</option>
|
||||||
|
</component>
|
||||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||||
<exclude-output />
|
<exclude-output />
|
||||||
<content url="file://$MODULE_DIR$" />
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
|||||||
6
lms/.idea/vcs.xml
generated
Normal file
6
lms/.idea/vcs.xml
generated
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
@@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
|
<axis.jar.path>${pom.basedir}/src/main/java/org/nl/libs/axis.jar</axis.jar.path>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||||
<java.version>1.8</java.version>
|
<java.version>1.8</java.version>
|
||||||
@@ -32,8 +33,43 @@
|
|||||||
<configuration.version>1.9</configuration.version>
|
<configuration.version>1.9</configuration.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
|
|
||||||
|
<dependencies>
|
||||||
|
<!-- 引入第三方axis jar -->
|
||||||
|
<!-- <dependency>-->
|
||||||
|
<!-- <groupId>org.apache.axis</groupId>-->
|
||||||
|
<!-- <artifactId>axis</artifactId>-->
|
||||||
|
<!-- <version>1.4</version>-->
|
||||||
|
<!-- <scope>system</scope>-->
|
||||||
|
<!-- <systemPath>${axis.jar.path}</systemPath>-->
|
||||||
|
<!-- </dependency>-->
|
||||||
|
<!-- axis -->
|
||||||
|
<!-- https://mvnrepository.com/artifact/org.apache.axis/axis -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>org.apache.axis</groupId>
|
||||||
|
<artifactId>axis</artifactId>
|
||||||
|
<version>1.4</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- https://mvnrepository.com/artifact/wsdl4j/wsdl4j -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>wsdl4j</groupId>
|
||||||
|
<artifactId>wsdl4j</artifactId>
|
||||||
|
<version>1.6.2</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- 解决cell 转换问题-->
|
||||||
|
<!-- https://mvnrepository.com/artifact/javax.xml/jaxrpc-api -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>javax.xml</groupId>
|
||||||
|
<artifactId>jaxrpc-api</artifactId>
|
||||||
|
<version>1.1</version>
|
||||||
|
</dependency>
|
||||||
|
<!-- 解析调用结果以及数据转换包-->
|
||||||
|
<!-- https://mvnrepository.com/artifact/commons-discovery/commons-discovery -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>commons-discovery</groupId>
|
||||||
|
<artifactId>commons-discovery</artifactId>
|
||||||
|
<version>0.2</version>
|
||||||
|
</dependency>
|
||||||
<!-- 控制台高亮-->
|
<!-- 控制台高亮-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.fusesource.jansi</groupId>
|
<groupId>org.fusesource.jansi</groupId>
|
||||||
|
|||||||
@@ -1,33 +1,33 @@
|
|||||||
/*
|
///*
|
||||||
* 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 org.nl.config;
|
//package org.nl.config;
|
||||||
|
//
|
||||||
import org.springframework.context.annotation.Bean;
|
//import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
//import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
//import org.springframework.web.socket.server.standard.ServerEndpointExporter;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @author ZhangHouYing
|
// * @author ZhangHouYing
|
||||||
* @date 2019-08-24 15:44
|
// * @date 2019-08-24 15:44
|
||||||
*/
|
// */
|
||||||
@Configuration
|
//@Configuration
|
||||||
public class WebSocketConfig {
|
//public class WebSocketConfig {
|
||||||
|
//
|
||||||
@Bean
|
// @Bean
|
||||||
public ServerEndpointExporter serverEndpointExporter() {
|
// public ServerEndpointExporter serverEndpointExporter() {
|
||||||
return new ServerEndpointExporter();
|
// return new ServerEndpointExporter();
|
||||||
}
|
// }
|
||||||
}
|
//}
|
||||||
|
|||||||
@@ -2,16 +2,23 @@ package org.nl.wms.database.eas.controller;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import cn.dev33.satoken.annotation.SaIgnore;
|
import cn.dev33.satoken.annotation.SaIgnore;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.nl.common.base.CommonPage;
|
import org.nl.common.base.CommonPage;
|
||||||
import org.nl.common.base.CommonResult;
|
import org.nl.common.base.CommonResult;
|
||||||
import org.nl.common.base.RestBusinessTemplate;
|
import org.nl.common.base.RestBusinessTemplate;
|
||||||
|
import org.nl.common.base.ResultCode;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBill;
|
import org.nl.wms.database.eas.dao.EasOutInBill;
|
||||||
|
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
||||||
import org.nl.wms.database.eas.dao.HomeBillCounts;
|
import org.nl.wms.database.eas.dao.HomeBillCounts;
|
||||||
import org.nl.wms.database.eas.dto.EasOutInBillQuery;
|
import org.nl.wms.database.eas.dto.EasOutInBillQuery;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -34,6 +41,24 @@ public class EasOutInBillController {
|
|||||||
private IeasOutInBillService easOutInBillService;
|
private IeasOutInBillService easOutInBillService;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核单据
|
||||||
|
*
|
||||||
|
* @param ids 传入审核对象主键,例:{"id":"1"}
|
||||||
|
* @return 审核单据
|
||||||
|
*/
|
||||||
|
@PostMapping("/audit")
|
||||||
|
@Log("审核")
|
||||||
|
//@SaCheckPermission("@el.check(EasOutInBill:edit')")
|
||||||
|
public CommonResult audit(@RequestBody Set<String> ids) {
|
||||||
|
if (ids == null || ids.isEmpty()) {
|
||||||
|
return CommonResult.failed(ResultCode.FAILED);
|
||||||
|
}
|
||||||
|
return RestBusinessTemplate.execute(() -> easOutInBillService.audit(ids));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 首页显示出入库单据数量
|
* 首页显示出入库单据数量
|
||||||
*/
|
*/
|
||||||
@@ -44,9 +69,9 @@ public class EasOutInBillController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询出入库单据
|
* 查询出入库单据
|
||||||
|
*
|
||||||
* @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" }
|
* @param params 传入分页条件或查询条件,例:{"page":"0","size":"10", "fuzzy":"熊一" }
|
||||||
*/
|
*/
|
||||||
@PostMapping("/page")
|
@PostMapping("/page")
|
||||||
@@ -57,9 +82,21 @@ public class EasOutInBillController {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取单据列表
|
||||||
|
*/
|
||||||
|
@PostMapping("/getEasBills")
|
||||||
|
@Log("获取单据列表")
|
||||||
|
public ResponseEntity<List<EasOutInBillDetail>> getEasBills() {
|
||||||
|
return new ResponseEntity<>(easOutInBillService.getEasBills(), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 条件查询
|
* 条件查询
|
||||||
|
*
|
||||||
* @param params 传入查询条件,例:{"fuzzy":"熊一" }
|
* @param params 传入查询条件,例:{"fuzzy":"熊一" }
|
||||||
*/
|
*/
|
||||||
@PostMapping("/query")
|
@PostMapping("/query")
|
||||||
@@ -69,7 +106,6 @@ public class EasOutInBillController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增单据
|
* 新增单据
|
||||||
*
|
*
|
||||||
@@ -82,7 +118,6 @@ public class EasOutInBillController {
|
|||||||
return RestBusinessTemplate.execute(() -> easOutInBillService.create(entity));
|
return RestBusinessTemplate.execute(() -> easOutInBillService.create(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改单据
|
* 修改单据
|
||||||
*
|
*
|
||||||
@@ -99,6 +134,7 @@ public class EasOutInBillController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除单据
|
* 删除单据
|
||||||
|
*
|
||||||
* @param ids 传入单个或多个主键Id,例:["1","2"]
|
* @param ids 传入单个或多个主键Id,例:["1","2"]
|
||||||
* @return 删除结果
|
* @return 删除结果
|
||||||
*/
|
*/
|
||||||
@@ -106,6 +142,9 @@ public class EasOutInBillController {
|
|||||||
//@SaCheckPermission("@el.check(EasOutInBill:del')")
|
//@SaCheckPermission("@el.check(EasOutInBill:del')")
|
||||||
@PostMapping("/delete")
|
@PostMapping("/delete")
|
||||||
public CommonResult delete(@RequestBody Set<String> ids) {
|
public CommonResult delete(@RequestBody Set<String> ids) {
|
||||||
|
if (ids == null || ids.isEmpty()) {
|
||||||
|
return CommonResult.failed(ResultCode.FAILED);
|
||||||
|
}
|
||||||
return RestBusinessTemplate.execute(() -> easOutInBillService.deleteAll(ids));
|
return RestBusinessTemplate.execute(() -> easOutInBillService.deleteAll(ids));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
package org.nl.wms.database.eas.controller;
|
package org.nl.wms.database.eas.controller;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
import org.nl.common.base.CommonPage;
|
import org.nl.common.base.CommonPage;
|
||||||
import org.nl.common.base.CommonResult;
|
import org.nl.common.base.CommonResult;
|
||||||
import org.nl.common.base.RestBusinessTemplate;
|
import org.nl.common.base.RestBusinessTemplate;
|
||||||
|
import org.nl.common.base.ResultCode;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.http.HttpStatus;
|
import org.springframework.http.HttpStatus;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
@@ -29,6 +34,30 @@ public class EasOutInBillDetailController {
|
|||||||
@Resource
|
@Resource
|
||||||
private IeasOutInBillDetailService easOutInBillDetailService;
|
private IeasOutInBillDetailService easOutInBillDetailService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询库位
|
||||||
|
*
|
||||||
|
* @param params 传入选中的出入库单据明细行数据
|
||||||
|
*/
|
||||||
|
@PostMapping("/queryInventoryInfo")
|
||||||
|
@Log("查询库位")
|
||||||
|
public ResponseEntity<CommonPage<InventoryInfo>> queryInventoryInfo(@RequestBody List<EasOutInBillDetailVO> params) {
|
||||||
|
return new ResponseEntity<>(easOutInBillDetailService.queryInventoryInfo(params), HttpStatus.OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改库位
|
||||||
|
*
|
||||||
|
* @param entity 传入修改对象包含主键,例:{"id":"1", "name":"熊二" }
|
||||||
|
* @return 修改结果
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
@Log("修改")
|
||||||
|
//@SaCheckPermission("@el.check(EasOutInBillDetail:edit')")
|
||||||
|
public CommonResult update(@RequestBody List<EasOutInBillDetailVO> entity) {
|
||||||
|
return RestBusinessTemplate.execute(() -> easOutInBillDetailService.update(entity));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页查询
|
* 分页查询
|
||||||
@@ -41,16 +70,6 @@ public class EasOutInBillDetailController {
|
|||||||
return new ResponseEntity<>(easOutInBillDetailService.page(params), HttpStatus.OK);
|
return new ResponseEntity<>(easOutInBillDetailService.page(params), HttpStatus.OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* 查询库位
|
|
||||||
* @param params 传入选中的出入库单据明细行数据
|
|
||||||
*/
|
|
||||||
@PostMapping( "/queryInventoryInfo")
|
|
||||||
@Log("查询库位")
|
|
||||||
public ResponseEntity< List<EasOutInBillDetail>> queryInventoryInfo(@RequestBody EasOutInBillDetailVO params) {
|
|
||||||
return new ResponseEntity<>(easOutInBillDetailService.queryInventoryInfo(params), HttpStatus.OK);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 条件查询
|
* 条件查询
|
||||||
@@ -64,7 +83,6 @@ public class EasOutInBillDetailController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增数据
|
* 新增数据
|
||||||
*
|
*
|
||||||
@@ -78,20 +96,6 @@ public class EasOutInBillDetailController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 修改库位
|
|
||||||
*
|
|
||||||
* @param entity 传入修改对象包含主键,例:{"id":"1", "name":"熊二" }
|
|
||||||
* @return 修改结果
|
|
||||||
*/
|
|
||||||
@PostMapping("/update")
|
|
||||||
@Log("修改")
|
|
||||||
//@SaCheckPermission("@el.check(EasOutInBillDetail:edit')")
|
|
||||||
public CommonResult update(@RequestBody EasOutInBillDetailVO entity) {
|
|
||||||
return RestBusinessTemplate.execute(() -> easOutInBillDetailService.update(entity));
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除数据
|
* 删除数据
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -0,0 +1,85 @@
|
|||||||
|
package org.nl.wms.database.eas.controller;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@code @Description:} (EasOutInBillDetail)实体类
|
||||||
|
* {@code @Author:} gbx
|
||||||
|
*
|
||||||
|
* @since 2024-02-22
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ToString
|
||||||
|
@EqualsAndHashCode(callSuper = false)
|
||||||
|
@SuppressWarnings("serial")
|
||||||
|
@TableName("InventoryInfo")
|
||||||
|
public class InventoryInfo extends Model<InventoryInfo> {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = -7739291296662381393L;
|
||||||
|
//@TableId(value = "id", type = IdType.NONE)
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 主键id
|
||||||
|
*/
|
||||||
|
@TableId(value = "id", type = IdType.NONE)
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据编号
|
||||||
|
*/
|
||||||
|
private String djbh;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料编码
|
||||||
|
*/
|
||||||
|
private String wlbm;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 物料名称
|
||||||
|
*/
|
||||||
|
private String wlmc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库位编码
|
||||||
|
*/
|
||||||
|
private String kwbm;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库位名称
|
||||||
|
*/
|
||||||
|
private String kwmc;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 库位类型
|
||||||
|
*/
|
||||||
|
private String kwlx;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
private String sl;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -18,11 +18,7 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
|
|||||||
* @since 2024-02-21
|
* @since 2024-02-21
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@EqualsAndHashCode(callSuper = true)
|
||||||
@NoArgsConstructor
|
|
||||||
@AllArgsConstructor
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
|
||||||
@SuppressWarnings("serial")
|
|
||||||
@TableName("eas_out_in_bill")
|
@TableName("eas_out_in_bill")
|
||||||
public class EasOutInBill extends Model<EasOutInBill> {
|
public class EasOutInBill extends Model<EasOutInBill> {
|
||||||
|
|
||||||
@@ -33,7 +29,7 @@ public class EasOutInBill extends Model<EasOutInBill> {
|
|||||||
/**
|
/**
|
||||||
* 主键id
|
* 主键id
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id")
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
@@ -133,6 +129,8 @@ public class EasOutInBill extends Model<EasOutInBill> {
|
|||||||
private String llr;
|
private String llr;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取主键值
|
* 获取主键值
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -20,10 +20,7 @@ import com.baomidou.mybatisplus.extension.activerecord.Model;
|
|||||||
* @since 2024-02-22
|
* @since 2024-02-22
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
|
||||||
@ToString
|
@ToString
|
||||||
@AllArgsConstructor
|
|
||||||
@NoArgsConstructor
|
|
||||||
@EqualsAndHashCode(callSuper = false)
|
@EqualsAndHashCode(callSuper = false)
|
||||||
@SuppressWarnings("serial")
|
@SuppressWarnings("serial")
|
||||||
@TableName("eas_out_in_bill_detail")
|
@TableName("eas_out_in_bill_detail")
|
||||||
@@ -36,7 +33,7 @@ public class EasOutInBillDetail extends Model<EasOutInBillDetail> {
|
|||||||
/**
|
/**
|
||||||
* 主键id
|
* 主键id
|
||||||
*/
|
*/
|
||||||
@TableId(value = "id", type = IdType.NONE)
|
@TableId(value = "id", type = IdType.ASSIGN_UUID)
|
||||||
private String id;
|
private String id;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,17 @@ public class HomeBillCounts implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private String djlx;
|
private String djlx;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据类型
|
||||||
|
*/
|
||||||
|
private String ywlx;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据类型名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 单据数量
|
* 单据数量
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
package org.nl.wms.database.eas.dao.mapper;
|
package org.nl.wms.database.eas.dao.mapper;
|
||||||
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import io.lettuce.core.dynamic.annotation.Param;
|
import io.lettuce.core.dynamic.annotation.Param;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
@@ -18,4 +19,6 @@ public interface EasOutInBillDetailMapper extends BaseMapper<EasOutInBillDetail>
|
|||||||
|
|
||||||
void insertBatch(List<EasOutInBillDetail> entities);
|
void insertBatch(List<EasOutInBillDetail> entities);
|
||||||
|
|
||||||
|
@DS("oracle")
|
||||||
|
List<EasOutInBillDetail> selectPageWithInventory();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.nl.wms.database.eas.dao.mapper;
|
|||||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBill;
|
import org.nl.wms.database.eas.dao.EasOutInBill;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
||||||
import org.nl.wms.database.eas.dao.HomeBillCounts;
|
import org.nl.wms.database.eas.dao.HomeBillCounts;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -14,7 +15,7 @@ import java.util.List;
|
|||||||
public interface EasOutInBillMapper extends BaseMapper<EasOutInBill> {
|
public interface EasOutInBillMapper extends BaseMapper<EasOutInBill> {
|
||||||
|
|
||||||
@DS("oracle")
|
@DS("oracle")
|
||||||
List<EasOutInBill> getEasBills();
|
List<EasOutInBillDetail> getEasBills();
|
||||||
|
|
||||||
//AND STR_TO_DATE( cjsj, '%Y-%m-%d' ) >= CURDATE() - INTERVAL 1 MONTH;
|
//AND STR_TO_DATE( cjsj, '%Y-%m-%d' ) >= CURDATE() - INTERVAL 1 MONTH;
|
||||||
List<String> queryExistBills();
|
List<String> queryExistBills();
|
||||||
|
|||||||
@@ -1,17 +1,26 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="org.nl.wms.database.eas.dao.mapper.EasOutInBillDetailMapper">
|
<mapper namespace="org.nl.wms.database.eas.dao.mapper.EasOutInBillDetailMapper">
|
||||||
|
<select id="selectPageWithInventory" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
||||||
|
SELECT
|
||||||
|
E.*,
|
||||||
|
I.CURSTOREQTY AS SL
|
||||||
|
FROM
|
||||||
|
MEIAMSYSTEM.V_UC_OUTINBILL E
|
||||||
|
LEFT JOIN MEIAMSYSTEM.V_UC_INVENTORYINFO I ON E.CKBM = I.WAREHOUSENO
|
||||||
|
AND E.WLBM = I.MATERIALNO WHERE E.DJZT='提交' ORDER BY ID
|
||||||
|
</select>
|
||||||
<select id="queryInventoryInfo" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
<select id="queryInventoryInfo" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM V_UC_INVENTORYINFO
|
FROM V_UC_INVENTORYINFO
|
||||||
WHERE wlbm =#{params.wlbm}
|
WHERE wlbm =#{params.wlbm}
|
||||||
</select>
|
</select>
|
||||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="false">
|
||||||
insert into eas_out_in_bill_detail(djid, djlx, ywlx, djbh, zzbm, zzmc, btbz, djzt, cjsj, ywrq, cjr, flid, flxh,
|
insert into eas_out_in_bill_detail(id,djid, djlx, ywlx, djbh, zzbm, zzmc, btbz, djzt, cjsj, ywrq, cjr, flid, flxh,
|
||||||
wlbm, wlmc, ggxh, pc, jldw, jbjldw, fzjldw, sl, jbsl, fzsl, ckbm, ckmc, kwbm, kwmc, flbz, ycsl, code, cksj, llr)
|
wlbm, wlmc, ggxh, pc, jldw, jbjldw, fzjldw, sl, jbsl, fzsl, ckbm, ckmc, kwbm, kwmc, flbz, ycsl, code, cksj, llr)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.djid}, #{entity.djlx}, #{entity.ywlx}, #{entity.djbh}, #{entity.zzbm}, #{entity.zzmc},
|
(#{entity.id},#{entity.djid}, #{entity.djlx}, #{entity.ywlx}, #{entity.djbh}, #{entity.zzbm}, #{entity.zzmc},
|
||||||
#{entity.btbz}, #{entity.djzt}, #{entity.cjsj}, #{entity.ywrq}, #{entity.cjr}, #{entity.flid},
|
#{entity.btbz}, #{entity.djzt}, #{entity.cjsj}, #{entity.ywrq}, #{entity.cjr}, #{entity.flid},
|
||||||
#{entity.flxh}, #{entity.wlbm}, #{entity.wlmc}, #{entity.ggxh}, #{entity.pc}, #{entity.jldw},
|
#{entity.flxh}, #{entity.wlbm}, #{entity.wlmc}, #{entity.ggxh}, #{entity.pc}, #{entity.jldw},
|
||||||
#{entity.jbjldw}, #{entity.fzjldw}, #{entity.sl}, #{entity.jbsl}, #{entity.fzsl}, #{entity.ckbm},
|
#{entity.jbjldw}, #{entity.fzjldw}, #{entity.sl}, #{entity.jbsl}, #{entity.fzsl}, #{entity.ckbm},
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
<mapper namespace="org.nl.wms.database.eas.dao.mapper.EasOutInBillMapper">
|
<mapper namespace="org.nl.wms.database.eas.dao.mapper.EasOutInBillMapper">
|
||||||
|
|
||||||
|
|
||||||
<select id="getEasBills" resultType="org.nl.wms.database.eas.dao.EasOutInBill">
|
<select id="getEasBills" resultType="org.nl.wms.database.eas.dao.EasOutInBillDetail">
|
||||||
SELECT *
|
SELECT *
|
||||||
FROM V_UC_OUTINBILL
|
FROM MEIAMSYSTEM.V_UC_OUTINBILL
|
||||||
WHERE
|
WHERE
|
||||||
djzt = '保存'
|
djzt = '保存'
|
||||||
</select>
|
</select>
|
||||||
@@ -21,30 +21,49 @@
|
|||||||
|
|
||||||
<select id="getBillsCount" resultType="org.nl.wms.database.eas.dao.HomeBillCounts">
|
<select id="getBillsCount" resultType="org.nl.wms.database.eas.dao.HomeBillCounts">
|
||||||
SELECT
|
SELECT
|
||||||
|
CASE
|
||||||
|
WHEN types.djlx = 'XSCKD' THEN '销售出库'
|
||||||
|
WHEN types.djlx = 'CGTHD' THEN '采购退货出库'
|
||||||
|
WHEN types.djlx = 'DBCKD' THEN '调拨出库'
|
||||||
|
WHEN types.djlx = 'WWFLD' THEN '委外出库'
|
||||||
|
WHEN types.djlx = 'LLCKD' THEN '生产出库'
|
||||||
|
WHEN types.djlx = 'CGRKD' THEN '采购入库'
|
||||||
|
WHEN types.djlx = 'LLTHD' THEN '生产退料入库'
|
||||||
|
WHEN types.djlx = 'DBRKD' THEN '调拨入库'
|
||||||
|
WHEN types.djlx = 'WWRKD' THEN '委外入库'
|
||||||
|
ELSE types.djlx
|
||||||
|
END AS name,
|
||||||
types.djlx,
|
types.djlx,
|
||||||
|
CASE
|
||||||
|
WHEN types.djlx IN ('XSCKD', 'CGTHD', 'DBCKD', 'WWFLD', 'LLCKD') THEN 'OUT'
|
||||||
|
WHEN types.djlx IN ('CGRKD', 'LLTHD', 'DBRKD', 'WWRKD') THEN 'IN'
|
||||||
|
ELSE NULL
|
||||||
|
END AS ywlx,
|
||||||
COUNT(eas_out_in_bill.djlx) AS counts
|
COUNT(eas_out_in_bill.djlx) AS counts
|
||||||
FROM
|
FROM
|
||||||
(SELECT 'XSCKD' AS djlx
|
(SELECT 'XSCKD' AS djlx, 1 AS sort
|
||||||
UNION SELECT 'CGTHD'
|
UNION SELECT 'CGTHD', 2
|
||||||
UNION SELECT 'DDCKD'
|
UNION SELECT 'DBCKD', 3
|
||||||
UNION SELECT 'WWFLD'
|
UNION SELECT 'WWFLD', 4
|
||||||
UNION SELECT 'LLCKD'
|
UNION SELECT 'LLCKD', 5
|
||||||
UNION SELECT 'CGRKD'
|
UNION SELECT 'CGRKD', 6
|
||||||
UNION SELECT 'LLTHD'
|
UNION SELECT 'LLTHD', 7
|
||||||
UNION SELECT 'DBRKD'
|
UNION SELECT 'DBRKD', 8
|
||||||
UNION SELECT 'WWRKD') AS types
|
UNION SELECT 'WWRKD', 9) AS types
|
||||||
LEFT JOIN
|
LEFT JOIN
|
||||||
eas_out_in_bill ON types.djlx = eas_out_in_bill.djlx AND eas_out_in_bill.djzt = '保存'
|
eas_out_in_bill ON types.djlx = eas_out_in_bill.djlx AND eas_out_in_bill.djzt = '保存'
|
||||||
GROUP BY
|
GROUP BY
|
||||||
types.djlx;
|
types.djlx
|
||||||
|
ORDER BY
|
||||||
|
types.sort;
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
<insert id="insertBatch" keyProperty="id" useGeneratedKeys="false">
|
||||||
insert into eas_out_in_bill(djid, djbh, code, djlx, ywlx, zzbm, zzmc, ckmc, ckbm, djzt, cjsj, ywrq, cjr, btbz,
|
insert into eas_out_in_bill(id,djid, djbh, code, djlx, ywlx, zzbm, zzmc, ckmc, ckbm, djzt, cjsj, ywrq, cjr, btbz,
|
||||||
cksj, llr)
|
cksj, llr)
|
||||||
values
|
values
|
||||||
<foreach collection="entities" item="entity" separator=",">
|
<foreach collection="entities" item="entity" separator=",">
|
||||||
(#{entity.djid}, #{entity.djbh}, #{entity.code}, #{entity.djlx}, #{entity.ywlx}, #{entity.zzbm},
|
(#{entity.id}, #{entity.djid}, #{entity.djbh}, #{entity.code}, #{entity.djlx}, #{entity.ywlx}, #{entity.zzbm},
|
||||||
#{entity.zzmc}, #{entity.ckmc}, #{entity.ckbm}, #{entity.djzt}, #{entity.cjsj}, #{entity.ywrq},
|
#{entity.zzmc}, #{entity.ckmc}, #{entity.ckbm}, #{entity.djzt}, #{entity.cjsj}, #{entity.ywrq},
|
||||||
#{entity.cjr}, #{entity.btbz}, #{entity.cksj}, #{entity.llr})
|
#{entity.cjr}, #{entity.btbz}, #{entity.cksj}, #{entity.llr})
|
||||||
</foreach>
|
</foreach>
|
||||||
|
|||||||
@@ -15,7 +15,8 @@ import lombok.Builder;
|
|||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
@Builder
|
@Builder
|
||||||
@ToString
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
public class EasOutInBillDto implements Serializable {
|
public class EasOutInBillDto implements Serializable {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -2,8 +2,7 @@ package org.nl.wms.database.eas.dto;
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.*;
|
||||||
import lombok.EqualsAndHashCode;
|
|
||||||
import org.nl.common.domain.query.BaseQuery;
|
import org.nl.common.domain.query.BaseQuery;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBill;
|
import org.nl.wms.database.eas.dao.EasOutInBill;
|
||||||
|
|
||||||
@@ -14,6 +13,9 @@ import org.nl.wms.database.eas.dao.EasOutInBill;
|
|||||||
* @since 2024-02-21
|
* @since 2024-02-21
|
||||||
*/
|
*/
|
||||||
@Data
|
@Data
|
||||||
|
@Builder
|
||||||
|
@NoArgsConstructor
|
||||||
|
@AllArgsConstructor
|
||||||
@EqualsAndHashCode(callSuper = true)
|
@EqualsAndHashCode(callSuper = true)
|
||||||
public class EasOutInBillQuery extends BaseQuery<EasOutInBill> {
|
public class EasOutInBillQuery extends BaseQuery<EasOutInBill> {
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.nl.wms.database.eas.service;
|
package org.nl.wms.database.eas.service;
|
||||||
|
|
||||||
import org.nl.common.base.CommonPage;
|
import org.nl.common.base.CommonPage;
|
||||||
|
import org.nl.wms.database.eas.controller.InventoryInfo;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import org.nl.wms.database.eas.dto.EasOutInBillDetailVO;
|
import org.nl.wms.database.eas.dto.EasOutInBillDetailVO;
|
||||||
@@ -32,7 +33,7 @@ public interface IeasOutInBillDetailService extends IService<EasOutInBillDetail>
|
|||||||
* @param params 查询条件
|
* @param params 查询条件
|
||||||
* @return List<EasOutInBillDetail>
|
* @return List<EasOutInBillDetail>
|
||||||
*/
|
*/
|
||||||
List<EasOutInBillDetail> queryInventoryInfo(EasOutInBillDetailVO params);
|
CommonPage<InventoryInfo> queryInventoryInfo(List<EasOutInBillDetailVO> params);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -58,7 +59,7 @@ public interface IeasOutInBillDetailService extends IService<EasOutInBillDetail>
|
|||||||
*
|
*
|
||||||
* @param entity /
|
* @param entity /
|
||||||
*/
|
*/
|
||||||
void update(EasOutInBillDetailVO entity);
|
void update(List<EasOutInBillDetailVO> entity);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多选删除
|
* 多选删除
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ public interface IeasOutInBillService extends IService<EasOutInBill> {
|
|||||||
* Eas视图查询未提交的出入库单据
|
* Eas视图查询未提交的出入库单据
|
||||||
* @return List<EasOutInBill>
|
* @return List<EasOutInBill>
|
||||||
*/
|
*/
|
||||||
List<EasOutInBill> getEasBills();
|
List<EasOutInBillDetail> getEasBills();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -89,10 +89,19 @@ public interface IeasOutInBillService extends IService<EasOutInBill> {
|
|||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
* @param entity /
|
* @param entity 对象实体
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void update(EasOutInBillQuery entity);
|
void update(EasOutInBillQuery entity);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 审核
|
||||||
|
*
|
||||||
|
* @param ids /
|
||||||
|
*/
|
||||||
|
void audit(Set<String> ids);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多选删除
|
* 多选删除
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,8 @@
|
|||||||
package org.nl.wms.database.eas.service.impl;
|
package org.nl.wms.database.eas.service.impl;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import org.nl.wms.database.eas.controller.InventoryInfo;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
||||||
import org.nl.wms.database.eas.dto.EasOutInBillDetailVO;
|
import org.nl.wms.database.eas.dto.EasOutInBillDetailVO;
|
||||||
import org.nl.wms.database.eas.dao.mapper.EasOutInBillDetailMapper;
|
import org.nl.wms.database.eas.dao.mapper.EasOutInBillDetailMapper;
|
||||||
@@ -9,8 +12,12 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
import org.nl.common.base.CommonPage;
|
import org.nl.common.base.CommonPage;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -35,7 +42,9 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl<EasOutInBillDetai
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public CommonPage<EasOutInBillDetail> page(EasOutInBillDetailVO params) {
|
public CommonPage<EasOutInBillDetail> page(EasOutInBillDetailVO params) {
|
||||||
Page<EasOutInBillDetail> result = easOutInBillDetailMapper.selectPage(new Page<>(params.getPage() + 1, params.getSize()), new QueryWrapper<EasOutInBillDetail>()
|
// List<EasOutInBillDetail> result = easOutInBillDetailMapper.selectPageWithInventory(params.getDjid(), params.getPage(), params.getSize());
|
||||||
|
// return CommonPage.restPage(result);
|
||||||
|
Page<EasOutInBillDetail> result = easOutInBillDetailMapper.selectPage(new Page<>(params.getPage(), params.getSize()), new QueryWrapper<EasOutInBillDetail>()
|
||||||
.lambda()
|
.lambda()
|
||||||
.eq(ObjectUtil.isNotEmpty(params), EasOutInBillDetail::getDjid, params.getDjid())
|
.eq(ObjectUtil.isNotEmpty(params), EasOutInBillDetail::getDjid, params.getDjid())
|
||||||
);
|
);
|
||||||
@@ -43,19 +52,46 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl<EasOutInBillDetai
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询库位
|
* 查询库位
|
||||||
*
|
*
|
||||||
* @param params 查询条件
|
* @param params 查询条件
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<EasOutInBillDetail> queryInventoryInfo(EasOutInBillDetailVO params) {
|
public CommonPage<InventoryInfo> queryInventoryInfo(List<EasOutInBillDetailVO> params) {
|
||||||
return easOutInBillDetailMapper.queryInventoryInfo(params);
|
List<InventoryInfo> inventoryInfoList = new ArrayList<>();
|
||||||
|
InventoryInfo inventoryInfo = new InventoryInfo();
|
||||||
|
InventoryInfo inventoryInfo1 = new InventoryInfo();
|
||||||
|
inventoryInfo.setId("1");
|
||||||
|
inventoryInfo.setDjbh("NLRK2308");
|
||||||
|
inventoryInfo.setWlbm("44023301");
|
||||||
|
inventoryInfo.setWlmc("主控制线束");
|
||||||
|
inventoryInfo.setKwmc("三期总装半成品库");
|
||||||
|
inventoryInfo.setKwbm("2.03.005");
|
||||||
|
inventoryInfo.setKwlx("电瓶夹头-6-510");
|
||||||
|
inventoryInfo.setSl("5000");
|
||||||
|
inventoryInfo1.setId("2");
|
||||||
|
inventoryInfo1.setDjbh("NLRK2309");
|
||||||
|
inventoryInfo1.setWlbm("44023302");
|
||||||
|
inventoryInfo1.setWlmc("主控制线束");
|
||||||
|
inventoryInfo1.setKwmc("三期总装半成品库");
|
||||||
|
inventoryInfo1.setKwbm("2.03.006");
|
||||||
|
inventoryInfo1.setKwlx("电瓶夹头-6-510");
|
||||||
|
inventoryInfo1.setSl("2000");
|
||||||
|
inventoryInfoList.add(inventoryInfo);
|
||||||
|
inventoryInfoList.add(inventoryInfo1);
|
||||||
|
CommonPage<InventoryInfo> commonPage = new CommonPage<>();
|
||||||
|
commonPage.setResult(inventoryInfoList);
|
||||||
|
commonPage.setCode(1);
|
||||||
|
commonPage.setDesc("查询成功");
|
||||||
|
commonPage.setPageNum(1);
|
||||||
|
commonPage.setPageSize(10);
|
||||||
|
commonPage.setTotalPage(1);
|
||||||
|
commonPage.setTotalElements(2);
|
||||||
|
return commonPage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据条件查询
|
* 根据条件查询
|
||||||
*
|
*
|
||||||
@@ -89,12 +125,13 @@ public class EasOutInBillDetailServiceImpl extends ServiceImpl<EasOutInBillDetai
|
|||||||
* @param entity 对象实体
|
* @param entity 对象实体
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void update(EasOutInBillDetailVO entity) {
|
public void update(List<EasOutInBillDetailVO> entity) {
|
||||||
// EasOutInBillDetail dto = easOutInBillDetailMapper.selectById(entity.getId());
|
// EasOutInBillDetail dto = easOutInBillDetailMapper.selectById(entity.getId());
|
||||||
// if (dto == null) {
|
// if (dto == null) {
|
||||||
// throw new BadRequestException("不存在该数据!");
|
// throw new BadRequestException("不存在该数据!");
|
||||||
// }
|
// }
|
||||||
easOutInBillDetailMapper.updateById(getBasicInfo(entity, false));
|
Integer sw = 1;
|
||||||
|
//easOutInBillDetailMapper.updateById(getBasicInfo(entity, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
package org.nl.wms.database.eas.service.impl;
|
package org.nl.wms.database.eas.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||||
import org.nl.common.base.CommonPage;
|
import org.nl.common.base.CommonPage;
|
||||||
import org.nl.common.exception.BadRequestException;
|
import org.nl.common.exception.BadRequestException;
|
||||||
|
import org.nl.common.utils.CodeUtil;
|
||||||
import org.nl.config.IdUtil;
|
import org.nl.config.IdUtil;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBill;
|
import org.nl.wms.database.eas.dao.EasOutInBill;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
||||||
@@ -57,7 +58,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public CommonPage<EasOutInBill> page(EasOutInBillQuery params) {
|
public CommonPage<EasOutInBill> page(EasOutInBillQuery params) {
|
||||||
Page<EasOutInBill> easOutInBills = easOutInBillMapper.selectPage(new Page<>(params.getPage() + 1, params.getSize()), new QueryWrapper<EasOutInBill>()
|
Page<EasOutInBill> easOutInBills = easOutInBillMapper.selectPage(new Page<>(params.getPage(), params.getSize()), new QueryWrapper<EasOutInBill>()
|
||||||
.lambda()
|
.lambda()
|
||||||
.eq(ObjectUtil.isNotEmpty(params.getDjlx()), EasOutInBill::getDjlx, params.getDjlx())
|
.eq(ObjectUtil.isNotEmpty(params.getDjlx()), EasOutInBill::getDjlx, params.getDjlx())
|
||||||
.nested(ObjectUtil.isNotEmpty(params.getFuzzy()),
|
.nested(ObjectUtil.isNotEmpty(params.getFuzzy()),
|
||||||
@@ -102,7 +103,7 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
|||||||
* Eas视图查询未提交的出入库单据
|
* Eas视图查询未提交的出入库单据
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<EasOutInBill> getEasBills() {
|
public List<EasOutInBillDetail> getEasBills() {
|
||||||
return easOutInBillMapper.getEasBills();
|
return easOutInBillMapper.getEasBills();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -141,9 +142,9 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
|||||||
.map(detail -> {
|
.map(detail -> {
|
||||||
EasOutInBill bill = new EasOutInBill();
|
EasOutInBill bill = new EasOutInBill();
|
||||||
bill.setId(IdUtil.getStringId());
|
bill.setId(IdUtil.getStringId());
|
||||||
|
bill.setCode(CodeUtil.getNewCode("TASK_CODE"));
|
||||||
bill.setDjid(detail.getDjid());
|
bill.setDjid(detail.getDjid());
|
||||||
bill.setDjbh(detail.getDjbh());
|
bill.setDjbh(detail.getDjbh());
|
||||||
bill.setCode(detail.getCode());
|
|
||||||
bill.setDjlx(detail.getDjlx());
|
bill.setDjlx(detail.getDjlx());
|
||||||
bill.setYwlx(detail.getYwlx());
|
bill.setYwlx(detail.getYwlx());
|
||||||
bill.setZzbm(detail.getZzbm());
|
bill.setZzbm(detail.getZzbm());
|
||||||
@@ -166,7 +167,6 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
|||||||
easOutInBillDetailMapper.insertBatch(detailList);
|
easOutInBillDetailMapper.insertBatch(detailList);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 编辑
|
* 编辑
|
||||||
*
|
*
|
||||||
@@ -181,6 +181,18 @@ public class EasOutInBillServiceImpl extends ServiceImpl<EasOutInBillMapper, Eas
|
|||||||
easOutInBillMapper.updateById(getBasicInfo(entity, false));
|
easOutInBillMapper.updateById(getBasicInfo(entity, false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 单据审核
|
||||||
|
*
|
||||||
|
* @param ids 对象实体
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void audit(Set<String> ids) {
|
||||||
|
easOutInBillMapper.update(null, new UpdateWrapper<EasOutInBill>().set("djzt", "提交").in("id", ids));
|
||||||
|
//todo 调外部webservice接口提交EAS审核结果
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 多选删除
|
* 多选删除
|
||||||
|
|||||||
@@ -0,0 +1,295 @@
|
|||||||
|
/**
|
||||||
|
* WSContext.java
|
||||||
|
*
|
||||||
|
* This file was auto-generated from WSDL
|
||||||
|
* by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package org.nl.wms.ext.eas;
|
||||||
|
|
||||||
|
public class WSContext implements java.io.Serializable {
|
||||||
|
private int dbType;
|
||||||
|
|
||||||
|
private String dcName;
|
||||||
|
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
private String sessionId;
|
||||||
|
|
||||||
|
private String slnName;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
public WSContext() {
|
||||||
|
}
|
||||||
|
|
||||||
|
public WSContext(
|
||||||
|
int dbType,
|
||||||
|
String dcName,
|
||||||
|
String password,
|
||||||
|
String sessionId,
|
||||||
|
String slnName,
|
||||||
|
String userName) {
|
||||||
|
this.dbType = dbType;
|
||||||
|
this.dcName = dcName;
|
||||||
|
this.password = password;
|
||||||
|
this.sessionId = sessionId;
|
||||||
|
this.slnName = slnName;
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the dbType value for this WSContext.
|
||||||
|
*
|
||||||
|
* @return dbType
|
||||||
|
*/
|
||||||
|
public int getDbType() {
|
||||||
|
return dbType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the dbType value for this WSContext.
|
||||||
|
*
|
||||||
|
* @param dbType
|
||||||
|
*/
|
||||||
|
public void setDbType(int dbType) {
|
||||||
|
this.dbType = dbType;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the dcName value for this WSContext.
|
||||||
|
*
|
||||||
|
* @return dcName
|
||||||
|
*/
|
||||||
|
public String getDcName() {
|
||||||
|
return dcName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the dcName value for this WSContext.
|
||||||
|
*
|
||||||
|
* @param dcName
|
||||||
|
*/
|
||||||
|
public void setDcName(String dcName) {
|
||||||
|
this.dcName = dcName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the password value for this WSContext.
|
||||||
|
*
|
||||||
|
* @return password
|
||||||
|
*/
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the password value for this WSContext.
|
||||||
|
*
|
||||||
|
* @param password
|
||||||
|
*/
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the sessionId value for this WSContext.
|
||||||
|
*
|
||||||
|
* @return sessionId
|
||||||
|
*/
|
||||||
|
public String getSessionId() {
|
||||||
|
return sessionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the sessionId value for this WSContext.
|
||||||
|
*
|
||||||
|
* @param sessionId
|
||||||
|
*/
|
||||||
|
public void setSessionId(String sessionId) {
|
||||||
|
this.sessionId = sessionId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the slnName value for this WSContext.
|
||||||
|
*
|
||||||
|
* @return slnName
|
||||||
|
*/
|
||||||
|
public String getSlnName() {
|
||||||
|
return slnName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the slnName value for this WSContext.
|
||||||
|
*
|
||||||
|
* @param slnName
|
||||||
|
*/
|
||||||
|
public void setSlnName(String slnName) {
|
||||||
|
this.slnName = slnName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Gets the userName value for this WSContext.
|
||||||
|
*
|
||||||
|
* @return userName
|
||||||
|
*/
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Sets the userName value for this WSContext.
|
||||||
|
*
|
||||||
|
* @param userName
|
||||||
|
*/
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
private Object __equalsCalc = null;
|
||||||
|
public synchronized boolean equals(Object obj) {
|
||||||
|
if (!(obj instanceof WSContext)) return false;
|
||||||
|
WSContext other = (WSContext) obj;
|
||||||
|
if (obj == null) return false;
|
||||||
|
if (this == obj) return true;
|
||||||
|
if (__equalsCalc != null) {
|
||||||
|
return (__equalsCalc == obj);
|
||||||
|
}
|
||||||
|
__equalsCalc = obj;
|
||||||
|
boolean _equals;
|
||||||
|
_equals = true &&
|
||||||
|
this.dbType == other.getDbType() &&
|
||||||
|
((this.dcName==null && other.getDcName()==null) ||
|
||||||
|
(this.dcName!=null &&
|
||||||
|
this.dcName.equals(other.getDcName()))) &&
|
||||||
|
((this.password==null && other.getPassword()==null) ||
|
||||||
|
(this.password!=null &&
|
||||||
|
this.password.equals(other.getPassword()))) &&
|
||||||
|
((this.sessionId==null && other.getSessionId()==null) ||
|
||||||
|
(this.sessionId!=null &&
|
||||||
|
this.sessionId.equals(other.getSessionId()))) &&
|
||||||
|
((this.slnName==null && other.getSlnName()==null) ||
|
||||||
|
(this.slnName!=null &&
|
||||||
|
this.slnName.equals(other.getSlnName()))) &&
|
||||||
|
((this.userName==null && other.getUserName()==null) ||
|
||||||
|
(this.userName!=null &&
|
||||||
|
this.userName.equals(other.getUserName())));
|
||||||
|
__equalsCalc = null;
|
||||||
|
return _equals;
|
||||||
|
}
|
||||||
|
|
||||||
|
private boolean __hashCodeCalc = false;
|
||||||
|
public synchronized int hashCode() {
|
||||||
|
if (__hashCodeCalc) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
__hashCodeCalc = true;
|
||||||
|
int _hashCode = 1;
|
||||||
|
_hashCode += getDbType();
|
||||||
|
if (getDcName() != null) {
|
||||||
|
_hashCode += getDcName().hashCode();
|
||||||
|
}
|
||||||
|
if (getPassword() != null) {
|
||||||
|
_hashCode += getPassword().hashCode();
|
||||||
|
}
|
||||||
|
if (getSessionId() != null) {
|
||||||
|
_hashCode += getSessionId().hashCode();
|
||||||
|
}
|
||||||
|
if (getSlnName() != null) {
|
||||||
|
_hashCode += getSlnName().hashCode();
|
||||||
|
}
|
||||||
|
if (getUserName() != null) {
|
||||||
|
_hashCode += getUserName().hashCode();
|
||||||
|
}
|
||||||
|
__hashCodeCalc = false;
|
||||||
|
return _hashCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Type metadata
|
||||||
|
private static org.apache.axis.description.TypeDesc typeDesc =
|
||||||
|
new org.apache.axis.description.TypeDesc(WSContext.class, true);
|
||||||
|
|
||||||
|
static {
|
||||||
|
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:client", "WSContext"));
|
||||||
|
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
|
||||||
|
elemField.setFieldName("dbType");
|
||||||
|
elemField.setXmlName(new javax.xml.namespace.QName("", "dbType"));
|
||||||
|
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "int"));
|
||||||
|
elemField.setNillable(false);
|
||||||
|
typeDesc.addFieldDesc(elemField);
|
||||||
|
elemField = new org.apache.axis.description.ElementDesc();
|
||||||
|
elemField.setFieldName("dcName");
|
||||||
|
elemField.setXmlName(new javax.xml.namespace.QName("", "dcName"));
|
||||||
|
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||||
|
elemField.setNillable(true);
|
||||||
|
typeDesc.addFieldDesc(elemField);
|
||||||
|
elemField = new org.apache.axis.description.ElementDesc();
|
||||||
|
elemField.setFieldName("password");
|
||||||
|
elemField.setXmlName(new javax.xml.namespace.QName("", "password"));
|
||||||
|
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||||
|
elemField.setNillable(true);
|
||||||
|
typeDesc.addFieldDesc(elemField);
|
||||||
|
elemField = new org.apache.axis.description.ElementDesc();
|
||||||
|
elemField.setFieldName("sessionId");
|
||||||
|
elemField.setXmlName(new javax.xml.namespace.QName("", "sessionId"));
|
||||||
|
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||||
|
elemField.setNillable(true);
|
||||||
|
typeDesc.addFieldDesc(elemField);
|
||||||
|
elemField = new org.apache.axis.description.ElementDesc();
|
||||||
|
elemField.setFieldName("slnName");
|
||||||
|
elemField.setXmlName(new javax.xml.namespace.QName("", "slnName"));
|
||||||
|
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||||
|
elemField.setNillable(true);
|
||||||
|
typeDesc.addFieldDesc(elemField);
|
||||||
|
elemField = new org.apache.axis.description.ElementDesc();
|
||||||
|
elemField.setFieldName("userName");
|
||||||
|
elemField.setXmlName(new javax.xml.namespace.QName("", "userName"));
|
||||||
|
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
|
||||||
|
elemField.setNillable(true);
|
||||||
|
typeDesc.addFieldDesc(elemField);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return type metadata object
|
||||||
|
*/
|
||||||
|
public static org.apache.axis.description.TypeDesc getTypeDesc() {
|
||||||
|
return typeDesc;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Custom Serializer
|
||||||
|
*/
|
||||||
|
public static org.apache.axis.encoding.Serializer getSerializer(
|
||||||
|
String mechType,
|
||||||
|
Class _javaType,
|
||||||
|
javax.xml.namespace.QName _xmlType) {
|
||||||
|
return
|
||||||
|
new org.apache.axis.encoding.ser.BeanSerializer(
|
||||||
|
_javaType, _xmlType, typeDesc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get Custom Deserializer
|
||||||
|
*/
|
||||||
|
public static org.apache.axis.encoding.Deserializer getDeserializer(
|
||||||
|
String mechType,
|
||||||
|
Class _javaType,
|
||||||
|
javax.xml.namespace.QName _xmlType) {
|
||||||
|
return
|
||||||
|
new org.apache.axis.encoding.ser.BeanDeserializer(
|
||||||
|
_javaType, _xmlType, typeDesc);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,88 @@
|
|||||||
|
package org.nl.wms.ext.eas;
|
||||||
|
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.axis.client.Call;
|
||||||
|
import org.apache.axis.client.Service;
|
||||||
|
import org.apache.axis.message.SOAPHeaderElement;
|
||||||
|
|
||||||
|
import javax.xml.namespace.QName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* WmsToEasService
|
||||||
|
*
|
||||||
|
* @author gbx
|
||||||
|
* @since 2024-03-29
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class WmsToEasService {
|
||||||
|
|
||||||
|
public static void sendWebService(String json) {
|
||||||
|
try {
|
||||||
|
String http = "http://192.168.100.100:8080/ormrpc/services/";
|
||||||
|
//用户
|
||||||
|
String user = "user";
|
||||||
|
//密码
|
||||||
|
String password = "Noble123!9";
|
||||||
|
//数据中心
|
||||||
|
String datacenter = "test";
|
||||||
|
//服务
|
||||||
|
String wsdlservice = "WSNLMESFacade";
|
||||||
|
//方法
|
||||||
|
String operationName = "dealTask";
|
||||||
|
try {
|
||||||
|
String[] msg = null;
|
||||||
|
Service s = new Service();
|
||||||
|
Call call = (Call) s.createCall();
|
||||||
|
call.setOperationName("login");
|
||||||
|
//登录的webservice的wsdl的地址
|
||||||
|
call.setTargetEndpointAddress(http + "EASLogin?wsdl");
|
||||||
|
call.setReturnType(new QName("urn:client", "WSContext"));
|
||||||
|
//本地根据wsdl文件建立的返回对象
|
||||||
|
call.setReturnClass(WSContext.class);
|
||||||
|
call.setReturnQName(new QName("", "loginReturn"));
|
||||||
|
//超时时间 自由配置
|
||||||
|
call.setTimeout(1000 * 60);
|
||||||
|
call.setMaintainSession(true);
|
||||||
|
WSContext result = null;
|
||||||
|
//解决方案:eas
|
||||||
|
//语言:L2 简体中文 L3 繁体中文
|
||||||
|
//数据库类型:0 SQL Server 1 Oracle 2 DB2
|
||||||
|
result = (WSContext) call.invoke(new Object[]{user, password, "eas", datacenter, "L2", 1, "BaseDB"});
|
||||||
|
//关键点,获取登录时返回的sessionid
|
||||||
|
String sessionId = result.getSessionId();
|
||||||
|
System.out.println(sessionId);
|
||||||
|
//登录失败抛出异常
|
||||||
|
if (sessionId == null) {
|
||||||
|
log.error("sendWebService调用结果"+"login Eas Fail");
|
||||||
|
throw new Exception("login Eas Fail");
|
||||||
|
}
|
||||||
|
call.clearOperation();
|
||||||
|
//超时时间 自由配置
|
||||||
|
call.setTimeout(1000 * 60);
|
||||||
|
call.setMaintainSession(true);
|
||||||
|
call.setTargetEndpointAddress(http + wsdlservice + "?wsdl");
|
||||||
|
call.setReturnQName(new QName("", "dealTaskReturn"));
|
||||||
|
//具体某个方法
|
||||||
|
call.setOperationName(operationName);
|
||||||
|
//关键点 传sessionid
|
||||||
|
call.addHeader(new SOAPHeaderElement("http://login.webservice.bos.kingdee.com", "SessionId", sessionId));
|
||||||
|
//接口报文
|
||||||
|
Object invoke = call.invoke(new Object[]{json});
|
||||||
|
JSONObject jsonObject = JSON.parseObject((String) invoke);
|
||||||
|
int results = jsonObject.getIntValue("result");
|
||||||
|
log.error("sendWebService调用:"+"调用成功!");
|
||||||
|
log.error("sendWebService调用结果:"+invoke.toString());
|
||||||
|
log.error("sendWebService调用结果:"+results);
|
||||||
|
System.out.println(invoke);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("sendWebService调用结果:"+e.toString());
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
} finally {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,15 @@
|
|||||||
package org.nl.wms.schedule;
|
package org.nl.wms.schedule;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONArray;
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
||||||
|
import org.nl.wms.database.eas.dao.mapper.EasOutInBillDetailMapper;
|
||||||
import org.nl.wms.database.eas.service.IeasOutInBillService;
|
import org.nl.wms.database.eas.service.IeasOutInBillService;
|
||||||
|
import org.nl.wms.ext.eas.WmsToEasService;
|
||||||
import org.springframework.scheduling.annotation.Async;
|
import org.springframework.scheduling.annotation.Async;
|
||||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -12,6 +17,7 @@ import java.util.*;
|
|||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
import org.nl.wms.database.eas.dao.EasOutInBill;
|
import org.nl.wms.database.eas.dao.EasOutInBill;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author gbx
|
* @author gbx
|
||||||
@@ -24,28 +30,62 @@ public class EasBillSchedule {
|
|||||||
@Resource
|
@Resource
|
||||||
private IeasOutInBillService easOutInBillService;
|
private IeasOutInBillService easOutInBillService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EasOutInBillDetailMapper easOutInBillDetailMapper;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* eas单据数据同步
|
* eas单据数据同步
|
||||||
*/
|
*/
|
||||||
@Async("taskExecutor")
|
@Async("taskExecutor")
|
||||||
//@Scheduled(cron = "0/10 * * * * *")
|
@Scheduled(cron = "0/10 * * * * *")
|
||||||
public void getEasOutInBills() {
|
public void getEasOutInBills() {
|
||||||
//Eas视图查询未提交的单据
|
//Eas视图查询未提交的单据
|
||||||
List<EasOutInBill> easOutInBillDetail = easOutInBillService.getEasBills();
|
List<EasOutInBillDetail> easOutInBillDetail = easOutInBillDetailMapper.selectPageWithInventory();
|
||||||
if (!easOutInBillDetail.isEmpty()) {
|
if (!easOutInBillDetail.isEmpty()) {
|
||||||
//本地查询未提交的单据
|
//本地查询未提交的单据
|
||||||
Set<String> existingId = new HashSet<>(easOutInBillService.queryExistBills());
|
Set<String> existingId = new HashSet<>(easOutInBillService.queryExistBills());
|
||||||
List<EasOutInBillDetail> insertBills = easOutInBillDetail.stream()
|
List<EasOutInBillDetail> insertBills = easOutInBillDetail.stream()
|
||||||
.filter(e -> !existingId.contains(e.getDjid())).map(e ->
|
.filter(e -> !existingId.contains(e.getDjid())).collect(Collectors.toList());
|
||||||
{
|
|
||||||
//oracle实体转换
|
|
||||||
EasOutInBillDetail workorder = new EasOutInBillDetail();
|
|
||||||
workorder.setBtbz(e.getBtbz());
|
|
||||||
return workorder;
|
|
||||||
}).collect(Collectors.toList());
|
|
||||||
if (insertBills.size() > 0) {
|
if (insertBills.size() > 0) {
|
||||||
easOutInBillService.createBills(insertBills);
|
easOutInBillService.createBills(insertBills);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Async("taskExecutor")
|
||||||
|
//@Scheduled(cron = "0/20 * * * * *")
|
||||||
|
//@PostConstruct
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void insertNewWorkOrders() {
|
||||||
|
log.error("开始调用webService接口:-----------------------*************");
|
||||||
|
// 创建 entrys 中的第一条数据
|
||||||
|
JSONObject entry1 = new JSONObject();
|
||||||
|
entry1.put("seq", "1");
|
||||||
|
entry1.put("entryId", "09fcf1b66ccc4a42bb45dd890274e60c");
|
||||||
|
entry1.put("qty", "1200");
|
||||||
|
entry1.put("warehouseNo", "C0154");
|
||||||
|
entry1.put("locationNo", "A01.01");
|
||||||
|
entry1.put("unitNo", "PCS");
|
||||||
|
entry1.put("remark", "分录摘要");
|
||||||
|
// 创建 entrys 列表
|
||||||
|
JSONArray entrys = new JSONArray();
|
||||||
|
entrys.add(entry1);
|
||||||
|
// 创建 data 数据
|
||||||
|
JSONObject data = new JSONObject();
|
||||||
|
data.put("billId", "2ZN2Zm4qTheGPDQDi8weqVAKt14=");
|
||||||
|
data.put("billNo", "NLRK230900300");
|
||||||
|
data.put("bizDate", "2024-03-24");
|
||||||
|
data.put("billType", "CGRKD");
|
||||||
|
data.put("description", "摘要");
|
||||||
|
data.put("entrys", entrys);
|
||||||
|
// 创建整个数据结构
|
||||||
|
JSONObject jsonData = new JSONObject();
|
||||||
|
jsonData.put("type", "WMS");
|
||||||
|
jsonData.put("method", "DealOutInBill");
|
||||||
|
jsonData.put("data", data);
|
||||||
|
WmsToEasService.sendWebService(jsonData.toJSONString());
|
||||||
|
log.error("结束调用webService接口:-----------------------*************");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<!--引入默认的一些设置-->
|
<!--引入默认的一些设置-->
|
||||||
<!--<include resource="log/XrToMes.xml"/>
|
<!--<include resource="log/XrToMes.xml"/>
|
||||||
<include resource="log/MesToErp.xml"/>-->
|
<include resource="log/MesToErp.xml"/>-->
|
||||||
<include resource="log/XgAgvDeviceDriver.xml"/>
|
<!-- <include resource="log/XgAgvDeviceDriver.xml"/>-->
|
||||||
|
|
||||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
<!--withJansi 参数改为true-->
|
<!--withJansi 参数改为true-->
|
||||||
@@ -75,6 +75,10 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<appender-ref ref="asyncFileAppender"/>
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
</root>
|
</root>
|
||||||
|
<logger name="jdbc.audit" level="ERROR" additivity="false">
|
||||||
|
<appender-ref ref="CONSOLE"/>
|
||||||
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
|
</logger>
|
||||||
<logger name="com.baomidou.mybatisplus.core.MybatisConfiguration" level="ERROR" additivity="false">
|
<logger name="com.baomidou.mybatisplus.core.MybatisConfiguration" level="ERROR" additivity="false">
|
||||||
<appender-ref ref="asyncLuceneAppender"/>
|
<appender-ref ref="asyncLuceneAppender"/>
|
||||||
<appender-ref ref="asyncFileAppender"/>
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
@@ -97,6 +101,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
</logger>
|
</logger>
|
||||||
<logger name="org.springframework" level="ERROR" additivity="true">
|
<logger name="org.springframework" level="ERROR" additivity="true">
|
||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
</logger>
|
</logger>
|
||||||
<logger name="com.baomidou.dynamic.datasource.DynamicRoutingDataSource" level="INFO" additivity="true">
|
<logger name="com.baomidou.dynamic.datasource.DynamicRoutingDataSource" level="INFO" additivity="true">
|
||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
@@ -144,6 +149,7 @@ https://juejin.cn/post/6844903775631572999
|
|||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
</logger>
|
</logger>
|
||||||
<logger name="log4jdbc" level="ERROR" additivity="true">
|
<logger name="log4jdbc" level="ERROR" additivity="true">
|
||||||
|
<appender-ref ref="asyncFileAppender"/>
|
||||||
<appender-ref ref="CONSOLE"/>
|
<appender-ref ref="CONSOLE"/>
|
||||||
</logger>
|
</logger>
|
||||||
<logger name="nl.basjes" level="ERROR" additivity="true">
|
<logger name="nl.basjes" level="ERROR" additivity="true">
|
||||||
|
|||||||
@@ -0,0 +1,110 @@
|
|||||||
|
package org.nl.test;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.apache.axis.message.SOAPHeaderElement;
|
||||||
|
import org.junit.jupiter.api.DisplayName;
|
||||||
|
import org.junit.jupiter.api.Test;
|
||||||
|
import org.junit.jupiter.api.extension.ExtendWith;
|
||||||
|
import org.nl.wms.database.eas.dao.EasOutInBill;
|
||||||
|
import org.nl.wms.database.eas.dao.EasOutInBillDetail;
|
||||||
|
import org.nl.wms.database.eas.service.IeasOutInBillService;
|
||||||
|
import org.nl.wms.ext.eas.WSContext;
|
||||||
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
|
import org.springframework.test.context.junit.jupiter.SpringExtension;
|
||||||
|
import org.apache.axis.client.Call;
|
||||||
|
import org.apache.axis.client.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.xml.namespace.QName;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author LuJ
|
||||||
|
* @date 2022-03-30
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@ExtendWith(SpringExtension.class)
|
||||||
|
@SpringBootTest
|
||||||
|
@DisplayName("event test")
|
||||||
|
public class EventTest {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IeasOutInBillService easOutInBillService;
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void getEasOutInBills() {
|
||||||
|
// //Eas视图查询未提交的单据
|
||||||
|
// List<EasOutInBill> easOutInBillDetail = easOutInBillService.getEasBills();
|
||||||
|
// if (!easOutInBillDetail.isEmpty()) {
|
||||||
|
// //本地查询未提交的单据
|
||||||
|
// Set<String> existingId = new HashSet<>(easOutInBillService.queryExistBills());
|
||||||
|
// List<EasOutInBillDetail> insertBills = easOutInBillDetail.stream()
|
||||||
|
// .filter(e -> !existingId.contains(e.getDjid())).map(e ->
|
||||||
|
// {
|
||||||
|
// //oracle实体转换
|
||||||
|
// EasOutInBillDetail workorder = new EasOutInBillDetail();
|
||||||
|
// workorder.setBtbz(e.getBtbz());
|
||||||
|
// return workorder;
|
||||||
|
// }).collect(Collectors.toList());
|
||||||
|
// if (insertBills.size() > 0) {
|
||||||
|
// easOutInBillService.createBills(insertBills);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void webServiceTest() {
|
||||||
|
String http="http://188.188.5.18:6888/ormrpc/services/";
|
||||||
|
String user = "user"; //用户
|
||||||
|
String password = "noble123666"; //密码
|
||||||
|
String datacenter = "cs"; //数据中心
|
||||||
|
String wsdlservice = "WSNLMESFacade"; //服务
|
||||||
|
String operationName = "dealTask"; //方法
|
||||||
|
try{
|
||||||
|
String[] msg = null;
|
||||||
|
Service s = new Service();
|
||||||
|
Call call=(Call)s.createCall();
|
||||||
|
call.setOperationName("login");
|
||||||
|
call.setTargetEndpointAddress(http + "EASLogin?wsdl"); //登录的webservice的wsdl的地址
|
||||||
|
call.setReturnType(new QName("urn:client","WSContext"));
|
||||||
|
call.setReturnClass(WSContext.class);//本地根据wsdl文件建立的返回对象
|
||||||
|
call.setReturnQName(new QName("","loginReturn"));
|
||||||
|
call.setTimeout(1000*60); //超时时间 自由配置
|
||||||
|
call.setMaintainSession(true);
|
||||||
|
WSContext result = null;
|
||||||
|
//解决方案:eas
|
||||||
|
//语言:L2 简体中文 L3 繁体中文
|
||||||
|
//数据库类型:0 SQL Server 1 Oracle 2 DB2
|
||||||
|
result = (WSContext)call.invoke(new Object[]{user,password,"eas", datacenter,"L2",1,"BaseDB"});
|
||||||
|
String sessionId = result.getSessionId(); //关键点,获取登录时返回的sessionid
|
||||||
|
System.out.println(sessionId);
|
||||||
|
if(sessionId == null){ //登录失败抛出异常
|
||||||
|
throw new Exception("login Eas Fail");
|
||||||
|
}
|
||||||
|
call.clearOperation();
|
||||||
|
call.setTimeout(1000*60); //超时时间 自由配置
|
||||||
|
call.setMaintainSession(true);
|
||||||
|
call.setTargetEndpointAddress(http+wsdlservice+"?wsdl");
|
||||||
|
call.setReturnQName(new QName("","dealTaskReturn"));
|
||||||
|
call.setOperationName(operationName); //具体某个方法
|
||||||
|
call.addHeader(new SOAPHeaderElement("http://login.webservice.bos.kingdee.com","SessionId",sessionId));//关键点 传sessionid
|
||||||
|
String json = ""; //接口报文
|
||||||
|
Object invoke = call.invoke(new Object[]{json});
|
||||||
|
System.out.println(invoke);
|
||||||
|
}catch(Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user