fix: 唛头修改
This commit is contained in:
@@ -41,6 +41,6 @@ public class LogMessageConstant {
|
||||
/** 背景颜色:黄色 */
|
||||
public final static String BACKGROUND_YELLOW = "\u001B[43m";
|
||||
/** 索引路径 */
|
||||
public final static String INDEX_DIR = "E:\\lucene\\index";
|
||||
public final static String INDEX_DIR = "D:\\lucene\\index";
|
||||
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ import org.nl.wms.ext.acs.service.dto.to.acs.ApplyTaskResponse;
|
||||
import org.nl.wms.ext.acs.service.dto.to.acs.GetPalletizeResponse;
|
||||
import org.nl.wms.ext.acs.service.dto.to.wms.*;
|
||||
import org.nl.wms.ext.mes.service.WmsToMesService;
|
||||
import org.nl.wms.ext.mes.service.dto.CusterDo;
|
||||
import org.nl.wms.ext.mes.service.dto.CusterVo;
|
||||
import org.nl.wms.ext.mes.service.dto.MesMudConsumptionDto;
|
||||
import org.nl.wms.ext.mms.service.WmsToMmsService;
|
||||
@@ -468,7 +469,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
*/
|
||||
@Override
|
||||
public ApplyTaskResponse applyLabelling(JSONObject param) {
|
||||
// 木托盘号(4)##物料编码(12)##数量(2-3)##吨量(单重X数量)##生产日期(11)##客户名称##订单号(12)##产品名称##型号
|
||||
// 木托盘号(4)##物料编码(12)##数量(2-3)##吨量(单重X数量)##生产日期(2023/11/04)##客户编码##订单号(12)#型号##产品名称##客户名称**
|
||||
String requestNo = param.getString("requestNo");
|
||||
ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class);
|
||||
if (baseRequest.getVehicle_code() == null) {
|
||||
@@ -491,16 +492,23 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
log.info("包装数据:{}", object);
|
||||
String custerNo = object.getString("custer_no");
|
||||
String orderNo = object.getString("order_no");
|
||||
CusterDo custer;
|
||||
if (custerNo.matches("\\d+")) {
|
||||
custer = wmsToMesService.getCusterByNo(custerNo);
|
||||
} else {
|
||||
custer = wmsToMesService.getCusterByName(custerNo);
|
||||
}
|
||||
// 组合
|
||||
sb.append(baseRequest.getVehicle_code()).append("##")
|
||||
.append(baseMaterial.getMaterial_code()).append("##")
|
||||
.append(groupInfo.getMaterial_qty()).append("##")
|
||||
.append(multiply).append("##")
|
||||
.append(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy年MM月dd日")).append("##")
|
||||
.append(custerNo).append("##")
|
||||
.append(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy/MM/dd")).append("##")
|
||||
.append(custer.getCuster_no()).append("##")
|
||||
.append(orderNo).append("##")
|
||||
.append(baseMaterial.getMaterial_spec() + "~" + baseMaterial.getMaterial_model()).append("##")
|
||||
.append(baseMaterial.getMaterial_name()).append("##")
|
||||
.append(baseMaterial.getMaterial_model()).append("**");
|
||||
.append(custer.getCuster_name()).append("**");
|
||||
return ApplyTaskResponse.responseOk(requestNo, sb.toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -3,10 +3,14 @@ package org.nl.wms.ext.mes.autotask;
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.nl.wms.ext.mes.service.WmsToMesService;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description: 自动同步物料
|
||||
@@ -18,8 +22,20 @@ import org.springframework.stereotype.Component;
|
||||
public class AutoSynMaterialInfo {
|
||||
@Autowired
|
||||
private WmsToMesService wmsToMesService;
|
||||
@Autowired
|
||||
private RedissonClient redissonClient;
|
||||
@SneakyThrows
|
||||
public void run() {
|
||||
wmsToMesService.synchronizeMaterialInfo();
|
||||
RLock lock = redissonClient.getLock(this.getClass().getName());
|
||||
boolean tryLock = lock.tryLock(0, TimeUnit.SECONDS);
|
||||
try {
|
||||
if (tryLock) {
|
||||
wmsToMesService.synchronizeMaterialInfo();
|
||||
}
|
||||
} finally {
|
||||
if (tryLock) {
|
||||
lock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public interface WmsToMesService {
|
||||
* @param custerNo
|
||||
* @return
|
||||
*/
|
||||
CusterVo getCusterByNo(String custerNo);
|
||||
CusterDo getCusterByNo(String custerNo);
|
||||
|
||||
/**
|
||||
* 分页获取数据
|
||||
@@ -132,4 +132,6 @@ public interface WmsToMesService {
|
||||
* @return
|
||||
*/
|
||||
int getTotal(String materialId);
|
||||
|
||||
CusterDo getCusterByName(String custerName);
|
||||
}
|
||||
|
||||
@@ -63,7 +63,7 @@ public interface MesRequestMapper {
|
||||
@DS("oracle")
|
||||
List<CusterVo> getCusterInfo();
|
||||
@DS("oracle")
|
||||
CusterVo getCusterByNo(String custerNo);
|
||||
CusterDo getCusterByNo(String custerNo);
|
||||
@DS("oracle")
|
||||
List<MesOrderInfo> selectPageMesOrder(String materialId, int currentPage, int currentSize);
|
||||
|
||||
@@ -74,4 +74,6 @@ public interface MesRequestMapper {
|
||||
*/
|
||||
@DS("oracle")
|
||||
int getOrderTotalByMaterial(String materialId);
|
||||
@DS("oracle")
|
||||
CusterDo getCusterByName(String custerName);
|
||||
}
|
||||
|
||||
@@ -284,8 +284,10 @@
|
||||
<select id="getCusterInfo" resultType="org.nl.wms.ext.mes.service.dto.CusterVo">
|
||||
SELECT CUSTER_NO, CUSTER_NAME FROM "RTMG"."VIEW_CUSTER_LMS"
|
||||
</select>
|
||||
<select id="getCusterByNo" resultType="org.nl.wms.ext.mes.service.dto.CusterVo">
|
||||
SELECT CUSTER_NO, CUSTER_NAME FROM "RTMG"."VIEW_CUSTER_LMS"
|
||||
<select id="getCusterByNo" resultType="org.nl.wms.ext.mes.service.dto.CusterDo">
|
||||
SELECT CUSTER_NO AS custer_no,
|
||||
CUSTER_NAME AS custer_name
|
||||
FROM "RTMG"."VIEW_CUSTER_LMS"
|
||||
WHERE CUSTER_NO = #{custerNo}
|
||||
</select>
|
||||
<select id="selectPageMesOrder" resultType="org.nl.wms.ext.mes.service.dto.MesOrderInfo">
|
||||
@@ -321,4 +323,10 @@
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getCusterByName" resultType="org.nl.wms.ext.mes.service.dto.CusterDo">
|
||||
SELECT CUSTER_NO AS custer_no,
|
||||
CUSTER_NAME AS custer_name
|
||||
FROM "RTMG"."VIEW_CUSTER_LMS"
|
||||
WHERE CUSTER_NAME = #{custerName}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
package org.nl.wms.ext.mes.service.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Description:
|
||||
* @Date: 2023/11/6
|
||||
*/
|
||||
@Data
|
||||
public class CusterDo {
|
||||
private String custer_no;
|
||||
private String custer_name;
|
||||
}
|
||||
@@ -416,7 +416,7 @@ public class WmsToMesServiceImpl implements WmsToMesService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CusterVo getCusterByNo(String custerNo) {
|
||||
public CusterDo getCusterByNo(String custerNo) {
|
||||
return mesRequestMapper.getCusterByNo(custerNo);
|
||||
}
|
||||
|
||||
@@ -430,6 +430,11 @@ public class WmsToMesServiceImpl implements WmsToMesService {
|
||||
return mesRequestMapper.getOrderTotalByMaterial(materialId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public CusterDo getCusterByName(String custerName) {
|
||||
return mesRequestMapper.getCusterByName(custerName);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换
|
||||
*
|
||||
|
||||
@@ -42,7 +42,7 @@ spring:
|
||||
freemarker:
|
||||
check-template-location: false
|
||||
profiles:
|
||||
active: prod
|
||||
active: test
|
||||
jackson:
|
||||
time-zone: GMT+8
|
||||
data:
|
||||
|
||||
@@ -141,6 +141,7 @@ public class TestDemo {
|
||||
@Test
|
||||
void testData() {
|
||||
System.out.println(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy年MM月dd日"));
|
||||
System.out.println(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy/MM/dd"));
|
||||
}
|
||||
@Test
|
||||
void testAdd() {
|
||||
@@ -148,4 +149,9 @@ public class TestDemo {
|
||||
Integer materialQty = 12;
|
||||
System.out.println(NumberUtil.add(realQty, materialQty));
|
||||
}
|
||||
@Test
|
||||
void testNumberStr() {
|
||||
System.out.println("1234564".matches("\\d+"));
|
||||
System.out.println("1234你好564".matches("\\d+"));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
v-for="item in custerList"
|
||||
:key="item.custer_NO"
|
||||
:label="item.custer_NAME"
|
||||
:value="item.custer_NAME"
|
||||
:value="item.custer_NO"
|
||||
>
|
||||
<span style="float: left">{{ item.custer_NO }}</span>
|
||||
<span style="float: right; color: #8492a6; font-size: 13px">{{ item.custer_NAME }}</span>
|
||||
|
||||
Reference in New Issue
Block a user