Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>llsh_wms</artifactId>
|
||||
<groupId>org.nl</groupId>
|
||||
<artifactId>jl_wms</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
@@ -31,18 +31,6 @@
|
||||
<artifactId>mongo-java-driver</artifactId>
|
||||
<version>3.4.2</version>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-core</artifactId>
|
||||
<version>1.1.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>ch.qos.logback</groupId>
|
||||
<artifactId>logback-classic</artifactId>
|
||||
<version>1.1.11</version>
|
||||
</dependency>
|
||||
-->
|
||||
<dependency>
|
||||
<groupId>org.reflections</groupId>
|
||||
<artifactId>reflections</artifactId>
|
||||
|
||||
@@ -87,6 +87,21 @@ public class MaterialDto implements Serializable {
|
||||
*/
|
||||
private String is_delete;
|
||||
|
||||
/**
|
||||
* 是否人工打包
|
||||
*/
|
||||
private String is_manmade;
|
||||
|
||||
/**
|
||||
* 码垛数量
|
||||
*/
|
||||
private Long palletize_num;
|
||||
|
||||
/**
|
||||
* 托盘类型
|
||||
*/
|
||||
private String vehicle_type;
|
||||
|
||||
/**
|
||||
* 外部标识
|
||||
*/
|
||||
|
||||
@@ -44,10 +44,10 @@ public class MaterialServiceImpl implements MaterialService {
|
||||
String sql = "1=1";
|
||||
if (StrUtil.isNotEmpty(name)) {
|
||||
sql = " (material_code like '%"+name+"%' OR material_code like '%"+name+"%')";
|
||||
|
||||
}
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), sql+ " and is_delete='0'", "update_time desc");
|
||||
ResultBean rb = wo.pagequery(WqlUtil.getHttpContext(page), sql + " and is_delete='0'", "update_time desc");
|
||||
final JSONObject json = rb.pageResult();
|
||||
log.info("json:{}",json);
|
||||
return json;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,11 @@
|
||||
package org.nl.wms.sch.rest;
|
||||
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.mysql.cj.xdevapi.JsonArray;
|
||||
import org.nl.wms.sch.AcsUtil;
|
||||
import org.nl.wms.sch.service.PointService;
|
||||
import org.nl.wms.sch.service.dto.PointDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@@ -13,6 +17,8 @@ import org.springframework.http.ResponseEntity;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import io.swagger.annotations.*;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@@ -88,4 +94,12 @@ public class PointController {
|
||||
return new ResponseEntity<>(pointService.getEndPoint(whereJson,page),HttpStatus.OK);
|
||||
}
|
||||
|
||||
@PostMapping("/getPointStatu")
|
||||
@Log("获取点位状态")
|
||||
@ApiOperation("获取点位状态")
|
||||
public ResponseEntity<Object> getPointStatu(@RequestBody JSONArray ja) {
|
||||
pointService.getPointStatuAndChage(ja);
|
||||
return new ResponseEntity<>(HttpStatus.OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
|
||||
package org.nl.wms.sch.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.nl.wms.sch.service.dto.PointDto;
|
||||
import org.springframework.data.domain.Pageable;
|
||||
@@ -79,4 +80,6 @@ public interface PointService {
|
||||
* 获取终点点位
|
||||
*/
|
||||
Map<String,Object> getEndPoint(Map whereJson, Pageable page);
|
||||
|
||||
void getPointStatuAndChage(JSONArray ja);
|
||||
}
|
||||
|
||||
@@ -7,14 +7,18 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.nl.exception.BadRequestException;
|
||||
import org.nl.wms.sch.AcsUtil;
|
||||
import org.nl.wms.sch.service.PointService;
|
||||
import org.nl.wms.sch.service.dto.PointDto;
|
||||
import org.nl.wql.WQL;
|
||||
import org.nl.wql.core.bean.ResultBean;
|
||||
import org.nl.wql.core.bean.WQLData;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import org.springframework.data.domain.Pageable;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -252,4 +256,26 @@ public class PointServiceImpl implements PointService {
|
||||
return json;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getPointStatuAndChage(JSONArray ja) {
|
||||
//发起请求获取数据
|
||||
try {
|
||||
JSONObject jsona = AcsUtil.notifyAcs("/api/wms/getPointStatus", ja);
|
||||
JSONArray arr = jsona.getJSONArray("key");
|
||||
WQLObject wql = WQLObject.getWQLObject("sch_base_point");
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject jsonObject = ja.getJSONObject(i);
|
||||
Long point_id = (Long) jsonObject.get("point_id");
|
||||
String point_status = (String) jsonObject.get("point_status");
|
||||
//获得单条数据
|
||||
JSONObject jo = wql.query("point_id='" + point_id + "'").uniqueResult(0);
|
||||
jo.put("point_status",point_status);
|
||||
//获取数据表,更新状态
|
||||
wql.update(jo);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
@@ -140,8 +140,8 @@ public class Test3 extends BaseTest {
|
||||
iodObject.put("col_num", structObject.getString("col"));
|
||||
iodObject.put("layer_num", structObject.getString("layer"));
|
||||
iodObject.put("height", 10);
|
||||
iodObject.put("out_seq_no", i*10);
|
||||
iodObject.put("in_seq_no", i*10);
|
||||
iodObject.put("out_seq_no", i * 10);
|
||||
iodObject.put("in_seq_no", i * 10);
|
||||
iodObject.put("load_series", 1);
|
||||
iodObject.put("create_id", 1);
|
||||
iodObject.put("create_name", "管理员");
|
||||
@@ -241,26 +241,189 @@ public class Test3 extends BaseTest {
|
||||
|
||||
}
|
||||
|
||||
//初始化入窑缓存货架
|
||||
@Test
|
||||
public void syncStruct4() {
|
||||
JSONArray structArray = WQLObject.getWQLObject("st_ivt_structattr").query("is_delete='0'").getResultJSONArray(0);
|
||||
WQLObject wo = WQLObject.getWQLObject("st_ivt_structrelavehicletype");
|
||||
String now = DateUtil.now();
|
||||
for (int i = 0; i < structArray.size(); i++) {
|
||||
for (int j = 1; j <= 3; j++) {
|
||||
JSONObject jsonObject = structArray.getJSONObject(i);
|
||||
JSONObject map = new JSONObject();
|
||||
map.put("relation_id", String.valueOf(IdUtil.getSnowflake(1, 1).nextId()));
|
||||
map.put("struct_id", jsonObject.getString("struct_id"));
|
||||
map.put("vehicle_type", "0" + j);
|
||||
map.put("create_id", 1);
|
||||
map.put("create_name", "管理员");
|
||||
map.put("create_time", now);
|
||||
map.put("update_optid", 1);
|
||||
map.put("update_optname", "管理员");
|
||||
map.put("update_time", now);
|
||||
wo.insert(map);
|
||||
WQLObject structTable = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
for (int i = 1; i < 4; i++) {
|
||||
for (int j = 1; j < 7; j++) {
|
||||
for (int k = 1; k < 3; k++) {
|
||||
String struct_id = IdUtil.getSnowflake(1, 1).nextIdStr();
|
||||
String struct_code = "L" + i + "-" + j + "-" + k;
|
||||
String struct_name = 1 + "排" + j + "列" + k + "层";
|
||||
String simple_name = struct_name;
|
||||
String sect_id = "1518109502010953728";
|
||||
String stor_id = "1518109007364100096";
|
||||
String row_seq = i + "";
|
||||
String col = j + "";
|
||||
String layer = j + "";
|
||||
String is_used = "1";
|
||||
String is_delete = "0";
|
||||
String create_id = "1";
|
||||
String create_name = "qinx";
|
||||
String create_time = DateUtil.now();
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("struct_id", struct_id);
|
||||
jo.put("struct_code", struct_code);
|
||||
jo.put("struct_name", struct_name);
|
||||
jo.put("simple_name", simple_name);
|
||||
jo.put("sect_id", sect_id);
|
||||
jo.put("stor_id", stor_id);
|
||||
jo.put("row_seq", row_seq);
|
||||
jo.put("col", col);
|
||||
jo.put("layer", layer);
|
||||
jo.put("is_used", is_used);
|
||||
jo.put("is_delete", is_delete);
|
||||
jo.put("create_id", create_id);
|
||||
jo.put("create_name", create_name);
|
||||
jo.put("create_time", create_time);
|
||||
structTable.insert(jo);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//初始化成品货架
|
||||
@Test
|
||||
public void syncStruct5() {
|
||||
WQLObject structTable = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
for (int i = 4; i < 5; i++) {
|
||||
for (int j = 1; j < 19; j++) {
|
||||
for (int k = 1; k < 3; k++) {
|
||||
String struct_id = IdUtil.getSnowflake(1, 1).nextIdStr();
|
||||
String struct_code = "L" + i + "-" + j + "-" + k;
|
||||
String struct_name = i + "排" + j + "列" + k + "层";
|
||||
String simple_name = struct_name;
|
||||
String sect_id = "1518109805401739264";
|
||||
String stor_id = "1518109007364100096";
|
||||
String row_seq = i + "";
|
||||
String col = j + "";
|
||||
String layer = j + "";
|
||||
String is_used = "1";
|
||||
String is_delete = "0";
|
||||
String create_id = "1";
|
||||
String create_name = "qinx";
|
||||
String create_time = DateUtil.now();
|
||||
JSONObject jo = new JSONObject();
|
||||
jo.put("struct_id", struct_id);
|
||||
jo.put("struct_code", struct_code);
|
||||
jo.put("struct_name", struct_name);
|
||||
jo.put("simple_name", simple_name);
|
||||
jo.put("sect_id", sect_id);
|
||||
jo.put("stor_id", stor_id);
|
||||
jo.put("row_seq", row_seq);
|
||||
jo.put("col", col);
|
||||
jo.put("layer", layer);
|
||||
jo.put("is_used", is_used);
|
||||
jo.put("is_delete", is_delete);
|
||||
jo.put("create_id", create_id);
|
||||
jo.put("create_name", create_name);
|
||||
jo.put("create_time", create_time);
|
||||
structTable.insert(jo);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
//初始化分配规则
|
||||
@Test
|
||||
public void syncStruct6() {
|
||||
WQLObject structTable = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
WQLObject ruleTable = WQLObject.getWQLObject("st_rule_iodisstruct");
|
||||
JSONArray arr = structTable.query("1=1").getResultJSONArray(0);
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject jo = arr.getJSONObject(i);
|
||||
String disrule_uuid = IdUtil.getSnowflake(1, 1).nextIdStr();
|
||||
String disrule_type = "00";
|
||||
String struct_uuid = jo.getString("struct_id");
|
||||
String struct_code = jo.getString("struct_code");
|
||||
String struct_name = jo.getString("struct_name");
|
||||
String sect_uuid = jo.getString("sect_id");
|
||||
String store_uuid = jo.getString("store_id");
|
||||
String row_num = jo.getString("row_seq");
|
||||
String col_num = jo.getString("col");
|
||||
String layer_num = jo.getString("layer");
|
||||
String height = "10";
|
||||
String out_seq_no = i * 10 + "";
|
||||
String in_seq_no = i * 10 + "";
|
||||
String load_series = "10";
|
||||
String create_time = DateUtil.now();
|
||||
String create_name = "qinx";
|
||||
String create_id = "1";
|
||||
JSONObject joObj = new JSONObject();
|
||||
joObj.put("create_id", create_id);
|
||||
joObj.put("create_name", create_name);
|
||||
joObj.put("create_time", create_time);
|
||||
joObj.put("load_series", load_series);
|
||||
joObj.put("in_seq_no", in_seq_no);
|
||||
joObj.put("out_seq_no", out_seq_no);
|
||||
joObj.put("height", height);
|
||||
joObj.put("layer_num", layer_num);
|
||||
joObj.put("sect_uuid", sect_uuid);
|
||||
joObj.put("col_num", col_num);
|
||||
joObj.put("row_num", row_num);
|
||||
joObj.put("store_uuid", store_uuid);
|
||||
joObj.put("struct_name", struct_name);
|
||||
joObj.put("struct_code", struct_code);
|
||||
joObj.put("struct_uuid", struct_uuid);
|
||||
joObj.put("disrule_type", disrule_type);
|
||||
joObj.put("disrule_uuid", disrule_uuid);
|
||||
ruleTable.insert(joObj);
|
||||
}
|
||||
}
|
||||
|
||||
//初始化仓位载具
|
||||
@Test
|
||||
public void syncStruct7() {
|
||||
WQLObject structTable = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
WQLObject ruleTable = WQLObject.getWQLObject("st_ivt_structrelavehicletype");
|
||||
JSONArray arr = structTable.query("1=1").getResultJSONArray(0);
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject jo = arr.getJSONObject(i);
|
||||
String relation_id = IdUtil.getSnowflake(1, 1).nextIdStr();
|
||||
String struct_id = jo.getString("struct_id");
|
||||
String vehicle_type = "02";
|
||||
String create_time = DateUtil.now();
|
||||
String create_name = "qinx";
|
||||
String create_id = "1";
|
||||
JSONObject joObj = new JSONObject();
|
||||
joObj.put("relation_id", relation_id);
|
||||
joObj.put("struct_id", struct_id);
|
||||
joObj.put("vehicle_type", vehicle_type);
|
||||
joObj.put("create_time", create_time);
|
||||
joObj.put("create_name", create_name);
|
||||
joObj.put("create_id", create_id);
|
||||
ruleTable.insert(joObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//初始化仓位载具
|
||||
@Test
|
||||
public void syncStruct8() {
|
||||
WQLObject structTable = WQLObject.getWQLObject("st_ivt_structattr");
|
||||
WQLObject ruleTable = WQLObject.getWQLObject("st_ivt_structrelamaterial");
|
||||
JSONArray arr = structTable.query("1=1").getResultJSONArray(0);
|
||||
for (int i = 0; i < arr.size(); i++) {
|
||||
JSONObject jo = arr.getJSONObject(i);
|
||||
String relation_id = IdUtil.getSnowflake(1, 1).nextIdStr();
|
||||
String struct_id = jo.getString("struct_id");
|
||||
String material_id = "1515940603542769664";
|
||||
String create_time = DateUtil.now();
|
||||
String create_name = "qinx";
|
||||
String create_id = "1";
|
||||
JSONObject joObj = new JSONObject();
|
||||
joObj.put("relation_id", relation_id);
|
||||
joObj.put("struct_id", struct_id);
|
||||
joObj.put("material_id", material_id);
|
||||
joObj.put("create_time", create_time);
|
||||
joObj.put("create_name", create_name);
|
||||
joObj.put("create_id", create_id);
|
||||
ruleTable.insert(joObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package org.nl.mongodb;
|
||||
|
||||
import java.util.Scanner;
|
||||
|
||||
class Tx {
|
||||
static int[] arr = {100,50,20,5,1}; //用来存纸币面额
|
||||
static int[] num = new int[5]; //每种纸币的数量
|
||||
public static void main(String[] args) {
|
||||
|
||||
Scanner sc = new Scanner(System.in);
|
||||
int n = sc.nextInt();
|
||||
|
||||
f(n);
|
||||
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
System.out.println(arr[i]+":"+num[i]);
|
||||
}
|
||||
}
|
||||
static void f(int n) {
|
||||
//遍历arr数组
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
// 求出每类纸币需要多少张
|
||||
num[i] = n / arr[i];
|
||||
n = n % arr[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<parent>
|
||||
<artifactId>llsh_wms</artifactId>
|
||||
<groupId>org.nl</groupId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<version>2.6</version>
|
||||
|
||||
<artifactId>nladmin-test</artifactId>
|
||||
<dependencies>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.nl</groupId>
|
||||
<artifactId>nladmin-system</artifactId>
|
||||
<version>2.6</version>
|
||||
<scope>compile</scope>
|
||||
</dependency>
|
||||
|
||||
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-autoconfigure</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-configuration-processor</artifactId>
|
||||
<version>2.0.0.RELEASE</version>
|
||||
<optional>true</optional>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
</project>
|
||||
@@ -1,8 +0,0 @@
|
||||
package org.nl;
|
||||
|
||||
public class Cat implements IShout {
|
||||
@Override
|
||||
public void shout() {
|
||||
System.out.println("miao miao111");
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package org.nl;
|
||||
|
||||
public class Dog implements IShout {
|
||||
@Override
|
||||
public void shout() {
|
||||
System.out.println("wang wang");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package org.nl;
|
||||
|
||||
public interface IShout {
|
||||
void shout();
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package org.nl;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@Api(tags = "运维:应用管理")
|
||||
@RequestMapping("/api/test")
|
||||
public class Test111 {
|
||||
public static void main(String[] args) {
|
||||
ServiceLoader<IShout> shouts = ServiceLoader.load(IShout.class);
|
||||
for (IShout s : shouts) {
|
||||
s.shout();
|
||||
}
|
||||
}
|
||||
@GetMapping(value = "/test")
|
||||
public String getStr() {
|
||||
return "hello";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package org.nl.starter;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
@ConfigurationProperties(prefix = "spring.tian")
|
||||
@Data
|
||||
public class TianProperties {
|
||||
private String name;
|
||||
private int age;
|
||||
private String sex = "M";
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package org.nl.starter;
|
||||
|
||||
public class TianService {
|
||||
private TianProperties properties;
|
||||
public TianService() {
|
||||
}
|
||||
public TianService(TianProperties userProperties) {
|
||||
this.properties = userProperties;
|
||||
}
|
||||
public void sayHello(){
|
||||
System.out.println("hi, 我叫: " + properties.getName() +
|
||||
", 今年" + properties.getAge() + "岁"
|
||||
+ ", 性别: " + properties.getSex());
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package org.nl.starter;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
@Configuration
|
||||
@EnableConfigurationProperties(TianProperties.class)
|
||||
@ConditionalOnClass(TianService.class)
|
||||
@ConditionalOnProperty(prefix = "spring.tian", value = "enabled", matchIfMissing = true)
|
||||
public class TianServiceAutoConfiguration {
|
||||
@Autowired
|
||||
private TianProperties properties;
|
||||
@Bean
|
||||
@ConditionalOnMissingBean(TianService.class)
|
||||
public TianService tianService() {
|
||||
return new TianService(properties);
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
org.nl.Cat
|
||||
org.nl.Dog
|
||||
@@ -1,2 +0,0 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.nl.starter.TianServiceAutoConfiguration
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
<groupId>org.nl</groupId>
|
||||
<artifactId>jl_wms</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>开发平台</name>
|
||||
<parent>
|
||||
<artifactId>nladmin</artifactId>
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
<modules>
|
||||
<module>nladmin-system</module>
|
||||
<module>nladmin-test</module>
|
||||
</modules>
|
||||
<dependencies>
|
||||
|
||||
|
||||
@@ -39,4 +39,12 @@ export function syncStruct() {
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, syncStruct }
|
||||
export function getPointStatu(data) {
|
||||
return request({
|
||||
url: 'api/point/getPointStatu',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
export default { add, edit, del, changeActive, syncStruct, getPointStatu }
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form-item label="物料编码" prop="material_code">
|
||||
<el-input v-model="form.material_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
@@ -36,6 +36,29 @@
|
||||
<el-form-item label="是否启用" prop="is_used">
|
||||
<el-radio v-for="item in dict.is_active" :key="item.id" v-model="form.is_used" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否人工打包" prop="is_manmade">
|
||||
<el-radio v-for="item in dict.is_active" :key="item.id" v-model="form.is_manmade" :label="item.value">{{ item.label }}</el-radio>
|
||||
</el-form-item>
|
||||
<el-form-item label="码垛数量" prop="palletize_num">
|
||||
<el-input-number v-model="form.palletize_num" controls-position="right" :min="0" :max="9999" />
|
||||
</el-form-item>
|
||||
<el-form-item label="托盘类型" prop="vehicle_type">
|
||||
<el-select
|
||||
v-model="form.vehicle_type"
|
||||
clearable
|
||||
size="mini"
|
||||
placeholder="请选择"
|
||||
class="filter-item"
|
||||
style="width: 250px;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in dict.MD_EVEHICLE_TYPE"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="false" label="外部标识">
|
||||
<el-input v-model="form.ext_id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
@@ -73,6 +96,24 @@
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="is_used" label="是否人工打包" width="100px">
|
||||
<template slot-scope="scope">
|
||||
<el-switch
|
||||
v-model="scope.row.is_manmade"
|
||||
active-color="#409EFF"
|
||||
inactive-color="#F56C6C"
|
||||
active-value="1"
|
||||
inactive-value="0"
|
||||
@change="changeEnabledManmade(scope.row, scope.row.is_manmade)"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="palletize_num" label="码垛数量" />
|
||||
<el-table-column prop="vehicle_type" label="托盘类型">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.MD_EVEHICLE_TYPE[scope.row.vehicle_type] }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column v-if="false" prop="ext_id" label="外部标识" />
|
||||
<el-table-column v-permission="[]" label="操作" width="120px" align="center" fixed="right">
|
||||
<template slot-scope="scope">
|
||||
@@ -97,12 +138,32 @@ import crudOperation from '@crud/CRUD.operation'
|
||||
import udOperation from '@crud/UD.operation'
|
||||
import pagination from '@crud/Pagination'
|
||||
|
||||
const defaultForm = { material_id: null, material_code: null, material_name: null, material_spec: null, material_model: null, english_name: null, create_id: null, create_name: null, create_time: null, update_optid: null, update_optname: null, update_time: null, is_used: '1', is_delete: null, ext_id: null, stewing_time: null }
|
||||
const defaultForm = {
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
material_name: null,
|
||||
material_spec: null,
|
||||
material_model: null,
|
||||
english_name: null,
|
||||
create_id: null,
|
||||
create_name: null,
|
||||
create_time: null,
|
||||
update_optid: null,
|
||||
update_optname: null,
|
||||
update_time: null,
|
||||
is_used: '1',
|
||||
is_delete: null,
|
||||
is_manmade: '1',
|
||||
vehicle_type: null,
|
||||
palletize_num: '1',
|
||||
ext_id: null,
|
||||
stewing_time: null
|
||||
}
|
||||
export default {
|
||||
name: 'MdMeMaterial',
|
||||
components: { pagination, crudOperation, rrOperation, udOperation },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
dicts: ['is_active', 'is_used'],
|
||||
dicts: ['is_active', 'is_used', 'MD_EVEHICLE_TYPE'],
|
||||
cruds() {
|
||||
return CRUD({ title: '物料', url: 'api/mdMeMaterial', idField: 'material_id', sort: 'material_id,desc', crudMethod: { ...crudMdMeMaterial },
|
||||
optShow: {
|
||||
@@ -117,7 +178,7 @@ export default {
|
||||
return {
|
||||
permission: {
|
||||
},
|
||||
rules: {
|
||||
rules: { // 表单验证
|
||||
material_code: [
|
||||
{ required: true, message: '物料编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
@@ -127,6 +188,15 @@ export default {
|
||||
is_used: [
|
||||
{ required: true, message: '是否启用不能为空', trigger: 'blur' }
|
||||
],
|
||||
is_manmade: [
|
||||
{ required: true, message: '是否人工打包不能为空', trigger: 'blur' }
|
||||
],
|
||||
palletize_num: [
|
||||
{ required: true, message: '码垛数量不能为空', trigger: 'blur' }
|
||||
],
|
||||
vehicle_type: [
|
||||
{ required: true, message: '托盘类型不能为空', trigger: 'blur' }
|
||||
],
|
||||
stewing_time: [
|
||||
{ required: true, message: '静止时间不能为空', trigger: 'blur' }
|
||||
]
|
||||
@@ -168,6 +238,37 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
// 改变人工打包状态
|
||||
changeEnabledManmade(data, val) {
|
||||
debugger
|
||||
this.$confirm('此操作将 "' + (val === 1 ? '切换人工打包' : '切换机器打包') + '"' + data.material_code + ', 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
crudMdMeMaterial.edit(data).then(res => {
|
||||
this.crud.notify(this.dict.label.is_used[val] + '成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
|
||||
}).catch(() => {
|
||||
debugger
|
||||
if (data.is_manmade === '0') {
|
||||
data.is_manmade = '1'
|
||||
return
|
||||
}
|
||||
if (data.is_manmade === '1') {
|
||||
data.is_manmade = '0'
|
||||
}
|
||||
})
|
||||
}).catch(() => {
|
||||
debugger
|
||||
if (data.is_manmade === '0') {
|
||||
data.is_manmade = '1'
|
||||
return
|
||||
}
|
||||
if (data.is_manmade === '1') {
|
||||
data.is_manmade = '0'
|
||||
}
|
||||
})
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value)
|
||||
}
|
||||
|
||||
@@ -121,17 +121,31 @@
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="info"
|
||||
:loading="syncLoading"
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="sync()"
|
||||
>
|
||||
仓位同步
|
||||
</el-button>
|
||||
<template slot="right">
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="info"
|
||||
:loading="syncLoading"
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="sync()"
|
||||
>
|
||||
仓位同步
|
||||
</el-button>
|
||||
<el-button
|
||||
slot="right"
|
||||
class="filter-item"
|
||||
type="primary"
|
||||
:disabled="crud.selections.length === 0"
|
||||
:loading="syncLoading"
|
||||
icon="el-icon-refresh"
|
||||
size="mini"
|
||||
@click="updateStatu"
|
||||
>
|
||||
更新状态
|
||||
</el-button>
|
||||
</template>
|
||||
</crudOperation>
|
||||
<!--表单组件-->
|
||||
<el-dialog
|
||||
@@ -230,7 +244,7 @@
|
||||
<el-table-column type="selection" width="55" />
|
||||
<el-table-column prop="point_code" label="点位编码" width="130" />
|
||||
<el-table-column prop="point_name" label="点位名称" width="130" />
|
||||
<el-table-column prop="area_type" label="所属区域" width="100">
|
||||
<el-table-column prop="area_type" label="所属区域" width="130">
|
||||
<template slot-scope="scope">
|
||||
{{ dict.label.sch_area_type[scope.row.area_type] }}
|
||||
</template>
|
||||
@@ -288,7 +302,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import crudPoint, { changeActive } from '@/api/wms/sch/point'
|
||||
import crudPoint, { changeActive, getPointStatu } from '@/api/wms/sch/point'
|
||||
import crudDevice from '@/api/wms/pdm/device'
|
||||
import CRUD, { presenter, header, form, crud } from '@crud/crud'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
@@ -414,6 +428,11 @@ export default {
|
||||
}).catch(err => {
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
},
|
||||
updateStatu() {
|
||||
getPointStatu(this.crud.selections).then(res => {
|
||||
console.log('res')
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
118
wms/qd/src/views/wms/st/buss/vehiclegroup/index.vue
Normal file
118
wms/qd/src/views/wms/st/buss/vehiclegroup/index.vue
Normal file
@@ -0,0 +1,118 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<!--工具栏-->
|
||||
<div class="head-container">
|
||||
<div v-if="crud.props.searchToggle">
|
||||
<!-- 搜索 -->
|
||||
<label class="el-form-item-label" />
|
||||
<el-input v-model="query.name" clearable placeholder="输入名称或编码" style="width: 185px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
|
||||
<rrOperation :crud="crud" />
|
||||
</div>
|
||||
<!--如果想在工具栏加入更多按钮,可以使用插槽方式, slot = 'left' or 'right'-->
|
||||
<crudOperation :permission="permission" />
|
||||
<!--表单组件-->
|
||||
<el-dialog :close-on-click-modal="false" :before-close="crud.cancelCU" :visible.sync="crud.status.cu > 0" :title="crud.status.title" width="550px">
|
||||
<el-form ref="form" :model="form" :rules="rules" size="mini" label-width="110px">
|
||||
<el-form-item label="托盘编码" prop="vehicle_code">
|
||||
<el-input v-model="form.vehicle_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="false" label="物料id">
|
||||
<el-input v-model="form.material_id" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item v-if="false" label="物料编码">
|
||||
<el-input v-model="form.material_code" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物料" prop="material_name">
|
||||
<label slot="label">物 料</label>
|
||||
<el-input v-model="form.material_name" style="width: 370px;" @focus="getMater" />
|
||||
</el-form-item>
|
||||
<el-form-item label="批次">
|
||||
<label slot="label">批 次</label>
|
||||
<el-input v-model="form.pcsn" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
<label slot="label">数 量</label>
|
||||
<el-input v-model="form.qty" style="width: 370px;" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="crud.cancelCU">取消</el-button>
|
||||
<el-button :loading="crud.cu === 2" type="primary" @click="crud.submitCU">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<MaterDialog :dialog-show.sync="materDialog" :dialog-matertype="materType" @tableChanged3="tableChanged3" />
|
||||
</div>
|
||||
<!--分页组件-->
|
||||
<pagination />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import CRUD, { crud, form, header, presenter } from '@crud/crud'
|
||||
import pagination from '@crud/Pagination'
|
||||
import crudOperation from '@crud/CRUD.operation'
|
||||
import rrOperation from '@crud/RR.operation'
|
||||
import crudMdMeMaterial from '@/api/wms/database/mdMeMaterial'
|
||||
import MaterDialog from '../../in/MaterDialog'
|
||||
|
||||
const defaultForm = {
|
||||
group_id: null,
|
||||
vehicle_code: null,
|
||||
material_id: null,
|
||||
material_code: null,
|
||||
material_name: null,
|
||||
pcsn: null,
|
||||
qty: null
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'Vehiclegroup',
|
||||
components: { pagination, crudOperation, rrOperation, MaterDialog },
|
||||
mixins: [presenter(), header(), form(defaultForm), crud()],
|
||||
cruds() {
|
||||
return CRUD({ title: '物料', url: 'api/mdMeMaterial', idField: 'material_id', sort: 'material_id,desc', crudMethod: { ...crudMdMeMaterial },
|
||||
optShow: {
|
||||
add: true,
|
||||
edit: false,
|
||||
del: false,
|
||||
download: false,
|
||||
reset: true
|
||||
}})
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
permission: {},
|
||||
rules: {
|
||||
vehicle_code: [
|
||||
{ required: true, message: '托盘编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
material_name: [
|
||||
{ required: true, message: '物料不能为空', trigger: 'change' }
|
||||
]
|
||||
},
|
||||
materDialog: false,
|
||||
materType: ''
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 钩子:在获取表格数据之前执行,false 则代表不获取数据
|
||||
[CRUD.HOOK.beforeRefresh]() {
|
||||
return true
|
||||
},
|
||||
// 打开选择物料对话框
|
||||
getMater() {
|
||||
this.materDialog = true
|
||||
},
|
||||
tableChanged3(row) {
|
||||
console.log(row)
|
||||
this.form.material_id = row.material_id
|
||||
this.form.material_code = row.material_code
|
||||
this.form.material_name = row.material_name
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user