fix: 唛头问题
This commit is contained in:
@@ -25,6 +25,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.CusterVo;
|
||||
import org.nl.wms.ext.mes.service.dto.MesMudConsumptionDto;
|
||||
import org.nl.wms.ext.mms.service.WmsToMmsService;
|
||||
import org.nl.wms.ext.record.service.ISysInteractRecordService;
|
||||
@@ -448,7 +449,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
*/
|
||||
@Override
|
||||
public ApplyTaskResponse applyLabelling(JSONObject param) {
|
||||
// 木托盘号##物料编码##数量##吨量(单重X数量)##生产日期## todo: 成型工单号(未添加)
|
||||
// 木托盘号##物料编码##数量##吨量(单重X数量)##生产日期##订单号
|
||||
String requestNo = param.getString("requestNo");
|
||||
ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class);
|
||||
if (baseRequest.getVehicle_code() == null) {
|
||||
@@ -464,11 +465,19 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
||||
String singleWeightStr = baseMaterial.getSingle_weight();
|
||||
BigDecimal singleWeight = BigDecimal.valueOf(Double.parseDouble(singleWeightStr));
|
||||
BigDecimal multiply = materialWeight.multiply(singleWeight);
|
||||
// 获取工单
|
||||
PdmBdWorkorder workorder = workorderService.getByCode(groupInfo.getWorkorder_code());
|
||||
String extData = workorder.getExt_data();
|
||||
JSONObject object = JSONObject.parseObject(extData);
|
||||
CusterVo custer = wmsToMesService.getCusterByNo(object.getString("custer_no"));
|
||||
// 组合
|
||||
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()), "yyyyMMdd"));
|
||||
.append(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy年MM月dd日")).append("##")
|
||||
.append(custer.getCUSTER_NAME()).append("##")
|
||||
.append(object.getString("order_no"));
|
||||
return ApplyTaskResponse.responseOk(requestNo, sb.toString());
|
||||
}
|
||||
|
||||
|
||||
@@ -104,4 +104,11 @@ public interface WmsToMesService {
|
||||
* @return
|
||||
*/
|
||||
List<CusterVo> getCusterInfo();
|
||||
|
||||
/**
|
||||
* 获取客户信息
|
||||
* @param custerNo
|
||||
* @return
|
||||
*/
|
||||
CusterVo getCusterByNo(String custerNo);
|
||||
}
|
||||
|
||||
@@ -64,4 +64,6 @@ public interface MesRequestMapper {
|
||||
IPage<MesOrderInfo> findOrderInfoByMaterialId(IPage<MesOrderInfo> pages, String materialId);
|
||||
@DS("oracle")
|
||||
List<CusterVo> getCusterInfo();
|
||||
@DS("oracle")
|
||||
CusterVo getCusterByNo(String custerNo);
|
||||
}
|
||||
|
||||
@@ -291,4 +291,8 @@
|
||||
<select id="getCusterInfo" resultType="org.nl.wms.ext.mes.service.dto.CusterVo">
|
||||
SELECT * FROM "RTMG"."VIEW_CUSTER_LMS"
|
||||
</select>
|
||||
<select id="getCusterByNo" resultType="org.nl.wms.ext.mes.service.dto.CusterVo">
|
||||
SELECT * FROM "RTMG"."VIEW_CUSTER_LMS"
|
||||
WHERE CUSTER_NO = #{custerNo}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -418,6 +418,11 @@ public class WmsToMesServiceImpl implements WmsToMesService {
|
||||
return mesRequestMapper.getCusterInfo();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CusterVo getCusterByNo(String custerNo) {
|
||||
return mesRequestMapper.getCusterByNo(custerNo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 转换
|
||||
*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.nl.ext;
|
||||
|
||||
import cn.hutool.core.date.DateUtil;
|
||||
import com.alibaba.fastjson.JSONArray;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.junit.jupiter.api.Test;
|
||||
@@ -135,4 +136,8 @@ public class TestDemo {
|
||||
System.out.println(sum);
|
||||
}
|
||||
|
||||
@Test
|
||||
void test04() {
|
||||
System.out.println(DateUtil.format(DateUtil.parse(DateUtil.today()), "yyyy年MM月dd日"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user