Browse Source

修改补码接口,修复工艺状态更新问题

zhifei 1 year ago
parent
commit
024f1c0cee

+ 8 - 8
warewms-admin/src/main/resources/logback.xml

@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <configuration>
     <!-- 日志存放路径 -->
-	<property name="log.path" value="/home/ruoyi/logs" />
+	<property name="log.path" value="../logs" />
     <!-- 日志输出格式 -->
 	<property name="log.pattern" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{20} - [%method,%line] - %msg%n" />
 
@@ -11,7 +11,7 @@
 			<pattern>${log.pattern}</pattern>
 		</encoder>
 	</appender>
-	
+
 	<!-- 系统日志输出 -->
 	<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
 	    <file>${log.path}/sys-info.log</file>
@@ -34,7 +34,7 @@
             <onMismatch>DENY</onMismatch>
         </filter>
 	</appender>
-	
+
 	<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
 	    <file>${log.path}/sys-error.log</file>
         <!-- 循环政策:基于时间创建日志文件 -->
@@ -56,7 +56,7 @@
             <onMismatch>DENY</onMismatch>
         </filter>
     </appender>
-	
+
 	<!-- 用户访问日志输出  -->
     <appender name="sys-user" class="ch.qos.logback.core.rolling.RollingFileAppender">
 		<file>${log.path}/sys-user.log</file>
@@ -70,7 +70,7 @@
             <pattern>${log.pattern}</pattern>
         </encoder>
     </appender>
-	
+
 	<!-- 系统模块日志级别控制  -->
 	<logger name="com.warewms" level="info" />
 	<!-- Spring日志级别控制  -->
@@ -79,15 +79,15 @@
 	<root level="info">
 		<appender-ref ref="console" />
 	</root>
-	
+
 	<!--系统操作日志-->
     <root level="info">
         <appender-ref ref="file_info" />
         <appender-ref ref="file_error" />
     </root>
-	
+
 	<!--系统用户操作日志-->
     <logger name="sys-user" level="info">
         <appender-ref ref="sys-user"/>
     </logger>
-</configuration> 
+</configuration>

+ 5 - 4
warewms-system/src/main/java/com/warewms/hailiang/service/impl/RetroactiveNowServiceImpl.java

@@ -119,18 +119,19 @@ public class RetroactiveNowServiceImpl extends ServiceImpl<RetroactiveNowMapper,
             mesService.processFeedback(retroactiveNow.getBatchNo(),"2");
         }
         LoginUser loginUser = SecurityUtils.getLoginUser();
-        baseData.setStatus(retroactiveNow.getStatus());
         baseData.setDeviceId("PDA");
         baseData.setUpdateBy(loginUser.getUsername());
         baseData.setRemark("PDA手动补码");
         if(Integer.parseInt(retroactiveNow.getStatus())>Integer.parseInt(baseData.getStatus())){
+            baseData.setStatus(retroactiveNow.getStatus());
             retroactiveNowMapper.updateById(baseData);
         }
-        baseData.setCreateBy(loginUser.getUsername());
-        if (ObjectUtil.isNull(retroactiveNow.getCreateTime())){
+        baseData.setStatus(retroactiveNow.getStatus());
+        if (ObjectUtil.isNull(retroactiveNow.getUpdateTime())){
             throw new ServiceException("工序完成时间为空!");
         }
-        baseData.setCreateTime(retroactiveNow.getCreateTime());
+        baseData.setCreateBy(loginUser.getUsername());
+        baseData.setCreateTime(retroactiveNow.getUpdateTime());
         RetroactiveHistory retroactiveHistory = BeanUtil.copyProperties(baseData, RetroactiveHistory.class);
         retroactiveHistory.setCreateTime(baseData.getUpdateTime());
         retroactiveHistoryMapper.insert(retroactiveHistory);