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.acs.GetPalletizeResponse;
|
||||||
import org.nl.wms.ext.acs.service.dto.to.wms.*;
|
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.WmsToMesService;
|
||||||
|
import org.nl.wms.ext.mes.service.dto.CusterVo;
|
||||||
import org.nl.wms.ext.mes.service.dto.MesMudConsumptionDto;
|
import org.nl.wms.ext.mes.service.dto.MesMudConsumptionDto;
|
||||||
import org.nl.wms.ext.mms.service.WmsToMmsService;
|
import org.nl.wms.ext.mms.service.WmsToMmsService;
|
||||||
import org.nl.wms.ext.record.service.ISysInteractRecordService;
|
import org.nl.wms.ext.record.service.ISysInteractRecordService;
|
||||||
@@ -448,7 +449,7 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public ApplyTaskResponse applyLabelling(JSONObject param) {
|
public ApplyTaskResponse applyLabelling(JSONObject param) {
|
||||||
// 木托盘号##物料编码##数量##吨量(单重X数量)##生产日期## todo: 成型工单号(未添加)
|
// 木托盘号##物料编码##数量##吨量(单重X数量)##生产日期##订单号
|
||||||
String requestNo = param.getString("requestNo");
|
String requestNo = param.getString("requestNo");
|
||||||
ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class);
|
ApplyTaskRequest baseRequest = param.toJavaObject(ApplyTaskRequest.class);
|
||||||
if (baseRequest.getVehicle_code() == null) {
|
if (baseRequest.getVehicle_code() == null) {
|
||||||
@@ -464,11 +465,19 @@ public class AcsToWmsServiceImpl implements AcsToWmsService {
|
|||||||
String singleWeightStr = baseMaterial.getSingle_weight();
|
String singleWeightStr = baseMaterial.getSingle_weight();
|
||||||
BigDecimal singleWeight = BigDecimal.valueOf(Double.parseDouble(singleWeightStr));
|
BigDecimal singleWeight = BigDecimal.valueOf(Double.parseDouble(singleWeightStr));
|
||||||
BigDecimal multiply = materialWeight.multiply(singleWeight);
|
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("##")
|
sb.append(baseRequest.getVehicle_code()).append("##")
|
||||||
.append(baseMaterial.getMaterial_code()).append("##")
|
.append(baseMaterial.getMaterial_code()).append("##")
|
||||||
|
.append(groupInfo.getMaterial_qty()).append("##")
|
||||||
.append(multiply).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());
|
return ApplyTaskResponse.responseOk(requestNo, sb.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -104,4 +104,11 @@ public interface WmsToMesService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<CusterVo> getCusterInfo();
|
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);
|
IPage<MesOrderInfo> findOrderInfoByMaterialId(IPage<MesOrderInfo> pages, String materialId);
|
||||||
@DS("oracle")
|
@DS("oracle")
|
||||||
List<CusterVo> getCusterInfo();
|
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 id="getCusterInfo" resultType="org.nl.wms.ext.mes.service.dto.CusterVo">
|
||||||
SELECT * FROM "RTMG"."VIEW_CUSTER_LMS"
|
SELECT * FROM "RTMG"."VIEW_CUSTER_LMS"
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
|
|||||||
@@ -418,6 +418,11 @@ public class WmsToMesServiceImpl implements WmsToMesService {
|
|||||||
return mesRequestMapper.getCusterInfo();
|
return mesRequestMapper.getCusterInfo();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public CusterVo getCusterByNo(String custerNo) {
|
||||||
|
return mesRequestMapper.getCusterByNo(custerNo);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 转换
|
* 转换
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package org.nl.ext;
|
package org.nl.ext;
|
||||||
|
|
||||||
|
import cn.hutool.core.date.DateUtil;
|
||||||
import com.alibaba.fastjson.JSONArray;
|
import com.alibaba.fastjson.JSONArray;
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
@@ -135,4 +136,8 @@ public class TestDemo {
|
|||||||
System.out.println(sum);
|
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