Browse Source

去掉任务事务注解

master
管理员 2 years ago
parent
commit
7d8cb55911
  1. 33
      lms/nladmin-system/pom.xml
  2. 10
      lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java
  3. 12
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/HLCallEmptyTask.java
  4. 14
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java
  5. 14
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/FJCallMaterialTask.java
  6. 16
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java
  7. 14
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/empty/FJSendEmptyTask.java
  8. 11
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/HLSendMaterialTask.java
  9. 14
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/SZSendMaterialTask.java
  10. 14
      lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/YZSendMaterialTask.java
  11. 4
      lms/nladmin-system/src/main/resources/config/application-dev.yml
  12. 4
      lms/nladmin-ui/src/views/wms/sch/point/index.vue

33
lms/nladmin-system/pom.xml

@ -19,7 +19,6 @@
<java.version>1.8</java.version> <java.version>1.8</java.version>
<log4jdbc.version>1.16</log4jdbc.version> <log4jdbc.version>1.16</log4jdbc.version>
<swagger.version>2.9.2</swagger.version> <swagger.version>2.9.2</swagger.version>
<fastjson.version>1.2.70</fastjson.version>
<druid.version>1.1.22</druid.version> <druid.version>1.1.22</druid.version>
<commons-pool2.version>2.5.0</commons-pool2.version> <commons-pool2.version>2.5.0</commons-pool2.version>
<mapstruct.version>1.3.1.Final</mapstruct.version> <mapstruct.version>1.3.1.Final</mapstruct.version>
@ -67,6 +66,12 @@
<groupId>org.reflections</groupId> <groupId>org.reflections</groupId>
<artifactId>reflections</artifactId> <artifactId>reflections</artifactId>
<version>0.9.10</version> <version>0.9.10</version>
<exclusions>
<exclusion>
<artifactId>guava</artifactId>
<groupId>com.google.guava</groupId>
</exclusion>
</exclusions>
</dependency> </dependency>
<!--Spring boot 安全框架--> <!--Spring boot 安全框架-->
@ -132,6 +137,10 @@
<groupId>io.swagger</groupId> <groupId>io.swagger</groupId>
<artifactId>swagger-models</artifactId> <artifactId>swagger-models</artifactId>
</exclusion> </exclusion>
<exclusion>
<artifactId>mapstruct</artifactId>
<groupId>org.mapstruct</groupId>
</exclusion>
</exclusions> </exclusions>
</dependency> </dependency>
<dependency> <dependency>
@ -186,6 +195,12 @@
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>easyexcel</artifactId> <artifactId>easyexcel</artifactId>
<version>2.1.6</version> <version>2.1.6</version>
<exclusions>
<exclusion>
<artifactId>asm</artifactId>
<groupId>org.ow2.asm</groupId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.poi</groupId> <groupId>org.apache.poi</groupId>
@ -207,14 +222,6 @@
<artifactId>xercesImpl</artifactId> <artifactId>xercesImpl</artifactId>
<version>2.12.0</version> <version>2.12.0</version>
</dependency> </dependency>
<!-- fastjson -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>${fastjson.version}</version>
</dependency>
<!--mapStruct依赖--> <!--mapStruct依赖-->
<dependency> <dependency>
<groupId>org.mapstruct</groupId> <groupId>org.mapstruct</groupId>
@ -269,7 +276,7 @@
<dependency> <dependency>
<groupId>org.aspectj</groupId> <groupId>org.aspectj</groupId>
<artifactId>aspectjweaver</artifactId> <artifactId>aspectjweaver</artifactId>
<version>1.9.2</version> <version>1.9.6</version>
</dependency> </dependency>
<!--接口限流--> <!--接口限流-->
@ -278,12 +285,6 @@
<artifactId>spring-boot-starter-aop</artifactId> <artifactId>spring-boot-starter-aop</artifactId>
</dependency> </dependency>
<!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>29.0-jre</version>
</dependency>
<!--模板引擎--> <!--模板引擎-->
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>

10
lms/nladmin-system/src/main/java/org/nl/wms/ext/acs/service/impl/AcsToWmsServiceImpl.java

@ -22,7 +22,6 @@ import org.nl.wms.sch.manage.*;
import org.nl.wms.sch.task.call.empty.HLCallEmptyTask; import org.nl.wms.sch.task.call.empty.HLCallEmptyTask;
import org.nl.wms.sch.task.call.empty.YZCallEmptyTask; import org.nl.wms.sch.task.call.empty.YZCallEmptyTask;
import org.nl.wms.sch.task.call.material.FJCallMaterialTask; import org.nl.wms.sch.task.call.material.FJCallMaterialTask;
import org.nl.wms.sch.task.call.material.SZCallMaterialTask;
import org.nl.wms.sch.task.send.empty.FJSendEmptyTask; import org.nl.wms.sch.task.send.empty.FJSendEmptyTask;
import org.nl.wms.sch.task.send.material.HLSendMaterialTask; import org.nl.wms.sch.task.send.material.HLSendMaterialTask;
import org.nl.wms.sch.task.send.material.SZSendMaterialTask; import org.nl.wms.sch.task.send.material.SZSendMaterialTask;
@ -184,6 +183,10 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public JSONObject apply(JSONObject param) { public JSONObject apply(JSONObject param) {
String point_code = param.getString("device_code"); String point_code = param.getString("device_code");
String type = param.getString("type");
if (StrUtil.isBlank(type)) {
throw new BadRequestException("任务类型不能为空!");
}
if (StrUtil.isBlank(point_code)) { if (StrUtil.isBlank(point_code)) {
throw new BadRequestException("点位不能为空!"); throw new BadRequestException("点位不能为空!");
} }
@ -204,11 +207,6 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
} }
TaskUtils.isLocked(point); TaskUtils.isLocked(point);
String type = param.getString("type");
if (StrUtil.isBlank(type)) {
throw new BadRequestException("任务类型不能为空!");
}
Region region = Region.get(point.getString("region_code")); Region region = Region.get(point.getString("region_code"));
JSONObject method_param = new JSONObject(); JSONObject method_param = new JSONObject();

12
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/HLCallEmptyTask.java

@ -37,7 +37,7 @@ public class HLCallEmptyTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
@ -67,7 +67,7 @@ public class HLCallEmptyTask extends AbstractAcsTask {
return task.getString("task_id"); return task.getString("task_id");
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void findStartPoint() { public void findStartPoint() {
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
@ -102,7 +102,7 @@ public class HLCallEmptyTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void forceFinish(String task_id) { public void forceFinish(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -112,7 +112,7 @@ public class HLCallEmptyTask extends AbstractAcsTask {
this.finishTask(task, OperationType.MANUAL); this.finishTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void cancel(String task_id) { public void cancel(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -122,7 +122,7 @@ public class HLCallEmptyTask extends AbstractAcsTask {
this.cancelTask(task, OperationType.MANUAL); this.cancelTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) { public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value()); task.put("task_status", TaskStatus.CANCELLED.value());
@ -160,7 +160,7 @@ public class HLCallEmptyTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());

14
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/empty/YZCallEmptyTask.java

@ -24,7 +24,7 @@ import org.springframework.transaction.annotation.Transactional;
@Component @Component
public class YZCallEmptyTask extends AbstractAcsTask { public class YZCallEmptyTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void updateTaskStatus(JSONObject task, String status) { public void updateTaskStatus(JSONObject task, String status) {
if (TaskStatus.EXECUTING.value().equals(status)) { if (TaskStatus.EXECUTING.value().equals(status)) {
@ -38,7 +38,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
@ -73,7 +73,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
return task.getString("task_id"); return task.getString("task_id");
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void findStartPoint() { public void findStartPoint() {
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
@ -112,7 +112,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void forceFinish(String task_id) { public void forceFinish(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -122,7 +122,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
this.finishTask(task, OperationType.MANUAL); this.finishTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void cancel(String task_id) { public void cancel(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -132,7 +132,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
this.cancelTask(task, OperationType.MANUAL); this.cancelTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) { public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value()); task.put("task_status", TaskStatus.CANCELLED.value());
@ -170,7 +170,7 @@ public class YZCallEmptyTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());

14
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/FJCallMaterialTask.java

@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
@Component @Component
public class FJCallMaterialTask extends AbstractAcsTask { public class FJCallMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void updateTaskStatus(JSONObject task, String status) { public void updateTaskStatus(JSONObject task, String status) {
if (TaskStatus.EXECUTING.value().equals(status)) { if (TaskStatus.EXECUTING.value().equals(status)) {
@ -36,7 +36,7 @@ public class FJCallMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
@ -67,7 +67,7 @@ public class FJCallMaterialTask extends AbstractAcsTask {
return task.getString("task_id"); return task.getString("task_id");
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void findStartPoint() { public void findStartPoint() {
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
@ -100,7 +100,7 @@ public class FJCallMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void forceFinish(String task_id) { public void forceFinish(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -110,7 +110,7 @@ public class FJCallMaterialTask extends AbstractAcsTask {
this.finishTask(task, OperationType.MANUAL); this.finishTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void cancel(String task_id) { public void cancel(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -120,7 +120,7 @@ public class FJCallMaterialTask extends AbstractAcsTask {
this.cancelTask(task, OperationType.MANUAL); this.cancelTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) { public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value()); task.put("task_status", TaskStatus.CANCELLED.value());
@ -158,7 +158,7 @@ public class FJCallMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());

16
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/call/material/SZCallMaterialTask.java

@ -21,7 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
@Component @Component
public class SZCallMaterialTask extends AbstractAcsTask { public class SZCallMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void autoCreate() { public void autoCreate() {
JSONArray points = WQL.getWO("CALL_MATERIAL_TASK").addParam("flag", "2").process().getResultJSONArray(0); JSONArray points = WQL.getWO("CALL_MATERIAL_TASK").addParam("flag", "2").process().getResultJSONArray(0);
@ -39,7 +39,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void updateTaskStatus(JSONObject task, String status) { public void updateTaskStatus(JSONObject task, String status) {
if (TaskStatus.EXECUTING.value().equals(status)) { if (TaskStatus.EXECUTING.value().equals(status)) {
@ -53,7 +53,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
@ -83,7 +83,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
return task.getString("task_id"); return task.getString("task_id");
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void findStartPoint() { public void findStartPoint() {
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
@ -117,7 +117,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void forceFinish(String task_id) { public void forceFinish(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -127,7 +127,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
this.finishTask(task, OperationType.MANUAL); this.finishTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void cancel(String task_id) { public void cancel(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -137,7 +137,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
this.cancelTask(task, OperationType.MANUAL); this.cancelTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) { public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value()); task.put("task_status", TaskStatus.CANCELLED.value());
@ -175,7 +175,7 @@ public class SZCallMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());

14
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/empty/FJSendEmptyTask.java

@ -21,7 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
@Component @Component
public class FJSendEmptyTask extends AbstractAcsTask { public class FJSendEmptyTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void updateTaskStatus(JSONObject task, String status) { public void updateTaskStatus(JSONObject task, String status) {
if (TaskStatus.EXECUTING.value().equals(status)) { if (TaskStatus.EXECUTING.value().equals(status)) {
@ -35,7 +35,7 @@ public class FJSendEmptyTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
@ -66,7 +66,7 @@ public class FJSendEmptyTask extends AbstractAcsTask {
return task.getString("task_id"); return task.getString("task_id");
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void findNextPoint() { public void findNextPoint() {
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
@ -97,7 +97,7 @@ public class FJSendEmptyTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void forceFinish(String task_id) { public void forceFinish(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -107,7 +107,7 @@ public class FJSendEmptyTask extends AbstractAcsTask {
this.finishTask(task, OperationType.MANUAL); this.finishTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void cancel(String task_id) { public void cancel(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -117,7 +117,7 @@ public class FJSendEmptyTask extends AbstractAcsTask {
this.cancelTask(task, OperationType.MANUAL); this.cancelTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) { public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value()); task.put("task_status", TaskStatus.CANCELLED.value());
@ -154,7 +154,7 @@ public class FJSendEmptyTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());

11
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/HLSendMaterialTask.java

@ -39,7 +39,6 @@ public class HLSendMaterialTask extends AbstractAcsTask {
} }
@Override @Override
@Transactional
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
@ -74,7 +73,7 @@ public class HLSendMaterialTask extends AbstractAcsTask {
return task.getString("task_id"); return task.getString("task_id");
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void findNextPoint() { public void findNextPoint() {
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
@ -105,7 +104,7 @@ public class HLSendMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void forceFinish(String task_id) { public void forceFinish(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -115,7 +114,7 @@ public class HLSendMaterialTask extends AbstractAcsTask {
this.finishTask(task, OperationType.MANUAL); this.finishTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void cancel(String task_id) { public void cancel(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -125,7 +124,7 @@ public class HLSendMaterialTask extends AbstractAcsTask {
this.cancelTask(task, OperationType.MANUAL); this.cancelTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) { public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value()); task.put("task_status", TaskStatus.CANCELLED.value());
@ -162,7 +161,7 @@ public class HLSendMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());

14
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/SZSendMaterialTask.java

@ -21,7 +21,7 @@ import org.springframework.transaction.annotation.Transactional;
@Component @Component
public class SZSendMaterialTask extends AbstractAcsTask { public class SZSendMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void updateTaskStatus(JSONObject task, String status) { public void updateTaskStatus(JSONObject task, String status) {
if (TaskStatus.EXECUTING.value().equals(status)) { if (TaskStatus.EXECUTING.value().equals(status)) {
@ -35,7 +35,7 @@ public class SZSendMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
@ -66,7 +66,7 @@ public class SZSendMaterialTask extends AbstractAcsTask {
return task.getString("task_id"); return task.getString("task_id");
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void findNextPoint() { public void findNextPoint() {
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
@ -97,7 +97,7 @@ public class SZSendMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void forceFinish(String task_id) { public void forceFinish(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -107,7 +107,7 @@ public class SZSendMaterialTask extends AbstractAcsTask {
this.finishTask(task, OperationType.MANUAL); this.finishTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void cancel(String task_id) { public void cancel(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -117,7 +117,7 @@ public class SZSendMaterialTask extends AbstractAcsTask {
this.cancelTask(task, OperationType.MANUAL); this.cancelTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) { public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value()); task.put("task_status", TaskStatus.CANCELLED.value());
@ -154,7 +154,7 @@ public class SZSendMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());

14
lms/nladmin-system/src/main/java/org/nl/wms/sch/task/send/material/YZSendMaterialTask.java

@ -22,7 +22,7 @@ import org.springframework.transaction.annotation.Transactional;
@Component @Component
public class YZSendMaterialTask extends AbstractAcsTask { public class YZSendMaterialTask extends AbstractAcsTask {
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void updateTaskStatus(JSONObject task, String status) { public void updateTaskStatus(JSONObject task, String status) {
if (TaskStatus.EXECUTING.value().equals(status)) { if (TaskStatus.EXECUTING.value().equals(status)) {
@ -36,7 +36,7 @@ public class YZSendMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public String createTask(JSONObject form) { public String createTask(JSONObject form) {
JSONObject point = form.getJSONObject("point"); JSONObject point = form.getJSONObject("point");
@ -68,7 +68,7 @@ public class YZSendMaterialTask extends AbstractAcsTask {
return task.getString("task_id"); return task.getString("task_id");
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void findNextPoint() { public void findNextPoint() {
WQLObject task_table = WQLObject.getWQLObject("sch_base_task"); WQLObject task_table = WQLObject.getWQLObject("sch_base_task");
@ -102,7 +102,7 @@ public class YZSendMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void forceFinish(String task_id) { public void forceFinish(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -112,7 +112,7 @@ public class YZSendMaterialTask extends AbstractAcsTask {
this.finishTask(task, OperationType.MANUAL); this.finishTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
@Override @Override
public void cancel(String task_id) { public void cancel(String task_id) {
JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0); JSONObject task = WQLObject.getWQLObject("sch_base_task").query("task_id = " + task_id).uniqueResult(0);
@ -122,7 +122,7 @@ public class YZSendMaterialTask extends AbstractAcsTask {
this.cancelTask(task, OperationType.MANUAL); this.cancelTask(task, OperationType.MANUAL);
} }
@Transactional(rollbackFor = Exception.class)
public void cancelTask(JSONObject task, OperationType operation_type) { public void cancelTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.CANCELLED.value()); task.put("task_status", TaskStatus.CANCELLED.value());
@ -159,7 +159,7 @@ public class YZSendMaterialTask extends AbstractAcsTask {
} }
} }
@Transactional(rollbackFor = Exception.class)
public void finishTask(JSONObject task, OperationType operation_type) { public void finishTask(JSONObject task, OperationType operation_type) {
if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) { if (task.getIntValue("task_status") < Integer.parseInt(TaskStatus.FINISHED.value())) {
task.put("task_status", TaskStatus.FINISHED.value()); task.put("task_status", TaskStatus.FINISHED.value());

4
lms/nladmin-system/src/main/resources/config/application-dev.yml

@ -6,9 +6,9 @@ spring:
druid: druid:
db-type: com.alibaba.druid.pool.DruidDataSource db-type: com.alibaba.druid.pool.DruidDataSource
driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy driverClassName: net.sf.log4jdbc.sql.jdbcapi.DriverSpy
url: jdbc:log4jdbc:mysql://${DB_HOST:127.0.0.1}:${DB_PORT:3306}/${DB_NAME:lnsh_lms3}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useOldAliasMetadataBehavior=true url: jdbc:log4jdbc:mysql://${DB_HOST:47.111.78.178}:${DB_PORT:3306}/${DB_NAME:lnsh_lms}?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useOldAliasMetadataBehavior=true
username: ${DB_USER:root} username: ${DB_USER:root}
password: ${DB_PWD:123456} password: ${DB_PWD:P@ssw0rd}
# 初始连接数 # 初始连接数
initial-size: 5 initial-size: 5
# 最小连接数 # 最小连接数

4
lms/nladmin-ui/src/views/wms/sch/point/index.vue

@ -258,7 +258,7 @@
<el-form-item v-show="crud.status.edit" label="载具编码" prop="vehicle_code"> <el-form-item v-show="crud.status.edit" label="载具编码" prop="vehicle_code">
<el-input v-model="form.vehicle_code" clearable style="width: 300px" /> <el-input v-model="form.vehicle_code" clearable style="width: 300px" />
</el-form-item> </el-form-item>
<el-form-item label="关联设备" prop="device_code"> <!-- <el-form-item label="关联设备" prop="device_code">
<el-select <el-select
v-model="form.device_code" v-model="form.device_code"
size="mini" size="mini"
@ -274,7 +274,7 @@
:value="item.device_code" :value="item.device_code"
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>-->
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="form.remark" style="width: 300px" rows="2" type="textarea" /> <el-input v-model="form.remark" style="width: 300px" rows="2" type="textarea" />
</el-form-item> </el-form-item>

Loading…
Cancel
Save