This commit is contained in:
2022-12-14 11:19:10 +08:00
19 changed files with 322 additions and 53 deletions

View File

@@ -128,6 +128,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
result.put("RTDAT", null);
System.out.println(result);
}
log.info("momRollFoilStart接口输出参数为-------------------" + result.toString());
return result;
}
@@ -176,6 +177,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
result.put("RTDAT", null);
System.out.println(result);
}
log.info("momRollFoilStart接口输出参数为-------------------" + result.toString());
return result;
}
@@ -446,6 +448,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
result.put("RTDAT", null);
System.out.println(result);
}
log.info("cutPlanTransfer接口输出参数为-------------------" + result.toString());
return result;
}
@@ -632,7 +635,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
result.put("RTDAT", null);
System.out.println(result);
}
log.info("callNextAssAndMomRoll接口输出参数为-------------------" + result.toString());
return result;
}
@@ -721,6 +724,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
result.put("RTDAT", null);
System.out.println(result);
}
log.info("childRollCutStartComp接口输出参数为-------------------" + result.toString());
return result;
}
@@ -849,6 +853,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
result.put("RTDAT", null);
System.out.println(result);
}
log.info("childRollPackComplete接口输出参数为-------------------" + result.toString());
return result;
}
@@ -963,6 +968,7 @@ public class MesToLmsServiceImpl implements MesToLmsService {
System.out.println(result);
}
// }
log.info("inventoryTransferInfoSync接口输出参数为-------------------" + result.toString());
return result;
}
@@ -1024,6 +1030,8 @@ public class MesToLmsServiceImpl implements MesToLmsService {
result.put("RTDAT", null);
System.out.println(result);
}
log.info("childRollInfoUpdate接口输出参数为-------------------" + result.toString());
return result;
}
}

View File

@@ -87,10 +87,12 @@ public class SapToLmsServiceImpl implements SapToLmsService {
} catch (Exception exception) {
result.put("RTYPE", "E");
result.put("RTMSG", "操作失败!" + exception.getMessage());
log.info("getMaterialInfo的输出参数为------------------------" + result.toString());
return result;
}
result.put("TYPE", "S");
result.put("MESSAGE", "物料同步成功!");
log.info("getMaterialInfo的输出参数为------------------------" + result.toString());
return result;
}
@@ -280,12 +282,14 @@ public class SapToLmsServiceImpl implements SapToLmsService {
result.put("RTMSG", "操作失败!" + e.getMessage());
result.put("RTOAL", 1);
result.put("RTDAT", null);
log.info("getDeliveryInfo的输出参数为------------------------" + result.toString());
return result;
}
result.put("RTYPE", "S");
result.put("RTMSG", "操作成功!");
result.put("RTOAL", 1);
result.put("RTDAT", null);
log.info("getDeliveryInfo的输出参数为------------------------" + result.toString());
return result;
}
@@ -337,6 +341,7 @@ public class SapToLmsServiceImpl implements SapToLmsService {
result.put("RTMSG", "操作成功!");
result.put("RTOAL", 1);
result.put("RTDAT", null);
log.info("getReturnDeliveryInfo的输出参数为------------------------" + result.toString());
return result;
}

View File

@@ -99,6 +99,9 @@
ENDOPTION
OPTION 输入.packageboxsn <> ""
sub.package_box_sn = 输入.packageboxsn
ENDOPTION
OPTION 输入.container_name <> ""
sub.container_name = 输入.container_name
ENDOPTION
ENDSELECT
ENDQUERY

View File

@@ -74,4 +74,12 @@ public class RawfoilworkorderController {
rawfoilworkorderService.compelEnd(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
@Log("称重")
@ApiOperation("称重")
@PostMapping("/confirm")
public ResponseEntity<Object> confirm(@RequestBody JSONObject whereJson) {
rawfoilworkorderService.confirm(whereJson);
return new ResponseEntity<>(HttpStatus.OK);
}
}

View File

@@ -78,4 +78,11 @@ public interface RawfoilworkorderService {
* @param whereJson /
*/
void compelEnd(JSONObject whereJson);
/**
* 称重
*
* @param whereJson /
*/
void confirm(JSONObject whereJson);
}

View File

@@ -208,4 +208,19 @@ public class RawfoilworkorderServiceImpl implements RawfoilworkorderService {
tab.update(json);
}
@Override
@Transactional(rollbackFor = Exception.class)
public void confirm(JSONObject whereJson) {
WQLObject tab = WQLObject.getWQLObject("PDM_BI_RawFoilWorkOrder");
String productin_qty = whereJson.getString("productin_qty");
JSONObject jsonRaw = tab.query("workorder_id = '" + whereJson.getString("workorder_id") + "'").uniqueResult(0);
if (ObjectUtil.isEmpty(productin_qty)) {
jsonRaw.put("productin_qty",0);
} else {
jsonRaw.put("productin_qty",whereJson.getDoubleValue("productin_qty"));
}
tab.update(jsonRaw);
}
}

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<!-- 按照每天生成日志文件 -->
<appender name="FILE4" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/LmsToMes/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>200MB</maxFileSize>
<!--所有日志最多占多大容量-->
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期%thread表示线程名%-5level级别从左显示5个字符宽度%msg日志消息%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.nl.wms.ext.mes.service.impl.LmsToMesServiceImpl" level="info" additivity="false">
<appender-ref ref="FILE4"/>
</logger>
<!-- 打印sql -->
</included>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<!-- 按照每天生成日志文件 -->
<appender name="FILE2" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/LmsToSap/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>200MB</maxFileSize>
<!--所有日志最多占多大容量-->
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期%thread表示线程名%-5level级别从左显示5个字符宽度%msg日志消息%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.nl.wms.ext.sap.service.impl.LmsToSapServiceImpl" level="info" additivity="false">
<appender-ref ref="FILE2"/>
</logger>
<!-- 打印sql -->
</included>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<!-- 按照每天生成日志文件 -->
<appender name="FILE3" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/MesToLms/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>200MB</maxFileSize>
<!--所有日志最多占多大容量-->
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期%thread表示线程名%-5level级别从左显示5个字符宽度%msg日志消息%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.nl.wms.ext.mes.service.impl.MesToLmsServiceImpl" level="info" additivity="false">
<appender-ref ref="FILE3"/>
</logger>
<!-- 打印sql -->
</included>

View File

@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<included>
<springProperty scope="context" name="logPath" source="logging.file.path" defaultValue="logs"/>
<property name="LOG_HOME" value="${logPath}"/>
<!-- 按照每天生成日志文件 -->
<appender name="FILE1" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
<!--日志文件输出的文件名-->
<FileNamePattern>${LOG_HOME}/SapToLms/%d{yyyy-MM-dd}.%i.log</FileNamePattern>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
<!--单个日志最大容量 至少10MB才能看得出来-->
<maxFileSize>200MB</maxFileSize>
<!--所有日志最多占多大容量-->
<totalSizeCap>20GB</totalSizeCap>
</rollingPolicy>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<!--格式化输出:%d表示日期%thread表示线程名%-5level级别从左显示5个字符宽度%msg日志消息%n是换行符-->
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.nl.wms.ext.sap.service.impl.SapToLmsServiceImpl" level="info" additivity="false">
<appender-ref ref="FILE1"/>
</logger>
<!-- 打印sql -->
</included>

View File

@@ -20,8 +20,10 @@ https://juejin.cn/post/6844903775631572999
<property name="SYSTEM_NAME" value="${systemName}"/>
<property name="LOG_HOME" value="${logPath}"/>
<!--引入默认的一些设置-->
<!--<include resource="log/XrToMes.xml"/>
<include resource="log/MesToErp.xml"/>-->
<include resource="log/LmsToMes.xml"/>
<include resource="log/LmsToSap.xml"/>
<include resource="log/MesToLms.xml"/>
<include resource="log/SapToLms.xml"/>
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<encoder>