fix: 任务业务以及与acs对接的接口
This commit is contained in:
@@ -80,7 +80,7 @@ public class PointCreate {
|
||||
void test03() { // 料盅睏料线区域
|
||||
// 创建LZKL01 - 32
|
||||
List<SchBasePoint> pointList = new ArrayList<>();
|
||||
for (int i = 1; i <= 12; i++) {// 3台
|
||||
for (int i = 13; i <= 32; i++) {// 3台
|
||||
String pointName = "睏料位";
|
||||
String pointCode = "KLW";
|
||||
if (i < 10) {
|
||||
@@ -153,4 +153,54 @@ public class PointCreate {
|
||||
}
|
||||
pointService.saveBatch(pointList);
|
||||
}
|
||||
@Test
|
||||
void test05() { // 双层缓存输送线缓存区域
|
||||
List<SchBasePoint> pointList = new ArrayList<>();
|
||||
for (int i = 1; i <= 40; i++) {
|
||||
String pointName = "缓存输送线";
|
||||
String pointCode = "HCSSX";
|
||||
if (i < 10) {
|
||||
pointName = pointName + "0" + i;
|
||||
pointCode = pointCode + "0" + i;
|
||||
} else {
|
||||
pointName = pointName + i;
|
||||
pointCode = pointCode + i;
|
||||
}
|
||||
SchBasePoint point = new SchBasePoint();
|
||||
point.setPoint_code(pointCode);
|
||||
point.setPoint_name(pointName);
|
||||
point.setRegion_code("HCSSX");
|
||||
point.setRegion_name("双层缓存输送线缓存区域");
|
||||
point.setParent_point_code(pointCode);
|
||||
point.setIs_has_workder(false);
|
||||
point.setIs_auto(true);
|
||||
pointList.add(point);
|
||||
}
|
||||
pointService.saveBatch(pointList);
|
||||
}
|
||||
@Test
|
||||
void test06() {
|
||||
List<SchBasePoint> pointList = new ArrayList<>();
|
||||
for (int i = 2; i <= 11; i++) {
|
||||
String pointName = "包装线";
|
||||
String pointCode = "BZX";
|
||||
if (i < 10) {
|
||||
pointName = pointName + "0" + i;
|
||||
pointCode = pointCode + "0" + i;
|
||||
} else {
|
||||
pointName = pointName + i;
|
||||
pointCode = pointCode + i;
|
||||
}
|
||||
SchBasePoint point = new SchBasePoint();
|
||||
point.setPoint_code(pointCode);
|
||||
point.setPoint_name(pointName);
|
||||
point.setRegion_code("BZ");
|
||||
point.setRegion_name("包装区域");
|
||||
point.setParent_point_code(pointCode);
|
||||
point.setIs_has_workder(false);
|
||||
point.setIs_auto(true);
|
||||
pointList.add(point);
|
||||
}
|
||||
pointService.saveBatch(pointList);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
package org.nl.point;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.nl.common.exception.BadRequestException;
|
||||
import org.nl.wms.sch.region.service.ISchBaseRegionService;
|
||||
import org.nl.wms.sch.region.service.dao.SchBaseRegion;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description:
|
||||
* @Date: 2023/7/12
|
||||
*/
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class test {
|
||||
@Autowired
|
||||
private ISchBaseRegionService regionService;
|
||||
|
||||
@Test
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
void test01() throws BadRequestException {
|
||||
SchBaseRegion yz = regionService.getOne(new LambdaQueryWrapper<SchBaseRegion>().eq(SchBaseRegion::getRegion_code, "YZ"));
|
||||
yz.setUpdate_time(DateUtil.now());
|
||||
regionService.update(yz);
|
||||
t2();
|
||||
}
|
||||
|
||||
public void t2() { // 异常
|
||||
SchBaseRegion e = new SchBaseRegion();
|
||||
e.setRegion_code("w");
|
||||
e.setRegion_name("w");
|
||||
e.setIs_has_workder(true);
|
||||
e.setOrder_seq(1);
|
||||
e.setCreate_id("1");
|
||||
e.setCreate_time("3");
|
||||
regionService.save(e);
|
||||
}
|
||||
|
||||
// @Test
|
||||
// void test02() {
|
||||
// BaseResponse grabResponse = t3();
|
||||
// BaseResponse baseResponse = ObjectUtil.cloneByStream(grabResponse);
|
||||
// System.out.println(baseResponse.hashCode());
|
||||
// GrabResponse gg = (GrabResponse) grabResponse;
|
||||
// System.out.println(gg.hashCode());
|
||||
// System.out.println(grabResponse.hashCode());
|
||||
// }
|
||||
//
|
||||
// public GrabResponse t3() {
|
||||
// GrabResponse g = new GrabResponse();
|
||||
// g.setValue("sss");
|
||||
// g.setCode(200);
|
||||
// System.out.println(g.hashCode());
|
||||
// return g;
|
||||
// }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user