|
|
@@ -228,9 +228,9 @@ public class GEServiceImpl implements GEService {
|
|
|
AsnDTO aAsnDTO = new AsnDTO();
|
|
|
SqlRowList rs = baseDao.queryForRowSet("select as_transid,as_asnno,TO_CHAR(as_recorddate, 'yyyy-MM-dd hh24:mi:ss') as_recorddate,TO_CHAR(asd_senddate, 'yyyy-MM-dd hh24:mi:ss') asd_senddate, " +
|
|
|
"as_packtype,asd_fyqty,asd_invoice,asd_tycode,TO_CHAR(asd_arrivaldate, 'yyyy-MM-dd hh24:mi:ss') asd_arrivaldate,TO_CHAR(asd_lgdate, 'yyyy-MM-dd hh24:mi:ss') asd_lgdate,TO_CHAR(asd_dgdate, 'yyyy-MM-dd hh24:mi:ss') asd_dgdate," +
|
|
|
- "asd_countryqy,asd_cityqy,asd_transportation " +
|
|
|
+ "asd_countryqy,asd_cityqy,asd_transportation,asd_organizecode,asd_iswooden " +
|
|
|
"from AsnShipment left join (select asd_asid,max(asd_senddate) asd_senddate,sum(nvl(asd_fyqty,0)) asd_fyqty,max(asd_invoice) asd_invoice,max(asd_tycode) asd_tycode,max(asd_arrivaldate) asd_arrivaldate, " +
|
|
|
- "max(asd_lgdate) asd_lgdate,max(asd_dgdate) asd_dgdate,max(asd_countryqy) asd_countryqy,max(asd_cityqy) asd_cityqy,max(asd_transportation) asd_transportation " +
|
|
|
+ "max(asd_lgdate) asd_lgdate,max(asd_dgdate) asd_dgdate,max(asd_countryqy) asd_countryqy,max(asd_cityqy) asd_cityqy,max(asd_transportation) asd_transportation,max(asd_organizecode) asd_organizecode,max(asd_iswooden) asd_iswooden " +
|
|
|
"from ASNSHIPMENTDETAIL group by asd_asid) on asd_asid = as_id " +
|
|
|
"where as_id = ?",id);
|
|
|
while (rs.next()) {
|
|
|
@@ -241,26 +241,8 @@ public class GEServiceImpl implements GEService {
|
|
|
aAsnDTO.setReceiverQualifier("ZZ");
|
|
|
aAsnDTO.setReceiverId("GOERTEK");
|
|
|
aAsnDTO.setAsnNo(rs.getGeneralString("as_asnno"));
|
|
|
- String dateStr = rs.getString("as_recorddate");
|
|
|
- if (dateStr != null) {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- try {
|
|
|
- Date date = sdf.parse(dateStr);
|
|
|
- aAsnDTO.setAsnDate(date);
|
|
|
- } catch (ParseException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
- }
|
|
|
- dateStr = rs.getString("asd_senddate");
|
|
|
- if (dateStr != null) {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- try {
|
|
|
- Date date = sdf.parse(dateStr);
|
|
|
- aAsnDTO.setShipDate(date);
|
|
|
- } catch (ParseException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
- }
|
|
|
+ aAsnDTO.setAsnDate(rs.getString("as_recorddate"));
|
|
|
+ aAsnDTO.setShipDate(rs.getString("asd_senddate"));
|
|
|
|
|
|
aAsnDTO.setPackType(rs.getGeneralString("as_packtype"));
|
|
|
aAsnDTO.setPackCount(rs.getGeneralString("asd_fyqty"));
|
|
|
@@ -271,36 +253,10 @@ public class GEServiceImpl implements GEService {
|
|
|
} else if ("N_HUASL_T".equals(master)) {
|
|
|
aAsnDTO.setVendorCode("14780");
|
|
|
}
|
|
|
- dateStr = rs.getString("asd_arrivaldate");
|
|
|
- if (dateStr != null) {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- try {
|
|
|
- Date date = sdf.parse(dateStr);
|
|
|
- aAsnDTO.setEstCCDate(date);
|
|
|
- } catch (ParseException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
- }
|
|
|
- dateStr = rs.getString("asd_lgdate");
|
|
|
- if (dateStr != null) {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- try {
|
|
|
- Date date = sdf.parse(dateStr);
|
|
|
- aAsnDTO.setEtd(date);
|
|
|
- } catch (ParseException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
- }
|
|
|
- dateStr = rs.getString("asd_dgdate");
|
|
|
- if (dateStr != null) {
|
|
|
- SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
- try {
|
|
|
- Date date = sdf.parse(dateStr);
|
|
|
- aAsnDTO.setEta(date);
|
|
|
- } catch (ParseException e) {
|
|
|
- throw new RuntimeException(e);
|
|
|
- }
|
|
|
- }
|
|
|
+ aAsnDTO.setEstCCDate(rs.getString("asd_arrivaldate"));
|
|
|
+ aAsnDTO.setEtd(rs.getString("asd_lgdate"));
|
|
|
+ aAsnDTO.setEta(rs.getString("asd_dgdate"));
|
|
|
+ aAsnDTO.setAttr1(rs.getString("asd_organizecode"));
|
|
|
aAsnDTO.setAttr2("Y");
|
|
|
aAsnDTO.setAttr7("N");
|
|
|
aAsnDTO.setAttr8(rs.getGeneralString("asd_iswooden"));
|
|
|
@@ -332,7 +288,7 @@ public class GEServiceImpl implements GEService {
|
|
|
if("箱序".equals(rsOrder.getString("as_packtype"))){
|
|
|
//箱序 asnPack
|
|
|
SqlRowList rsasnPack = baseDao.queryForRowSet("select as_asnno,aspo_cgcode,aspo_cgdetno,aspo_bzway,aspo_packno,aspo_bzqty,aspo_grossload, " +
|
|
|
- "aspo_tall,aspo_wide,aspo_long,aspo_quantity,aspo_custpartno,aspo_cgqty,aspo_countryyc " +
|
|
|
+ "aspo_tall,aspo_wide,aspo_long,aspo_quantity,aspo_custpartno,aspo_cgqty,aspo_countryyc,aspo_bztype,aspo_weight,aspo_invoice " +
|
|
|
"from AsnShipment left join ASNSHIPMENTORDER on as_id = aspo_asid where as_id = ?",id);
|
|
|
List<AsnPackDTO> AsnPackDTOl = new ArrayList<AsnPackDTO>();
|
|
|
while (rsasnPack.next()) {
|
|
|
@@ -349,6 +305,7 @@ public class GEServiceImpl implements GEService {
|
|
|
asnPackDTO.setLength(rsasnPack.getString("aspo_tall"));
|
|
|
asnPackDTO.setWidth(rsasnPack.getString("aspo_wide"));
|
|
|
asnPackDTO.setHeight(rsasnPack.getString("aspo_long"));
|
|
|
+ asnPackDTO.setDimUom("CM");
|
|
|
asnPackDTO.setManPackCount(rsasnPack.getString("aspo_quantity"));
|
|
|
asnPackDTO.setInnerPackCount(rsasnPack.getString("aspo_quantity"));
|
|
|
asnPackDTO.setAttr1("1");
|
|
|
@@ -365,8 +322,10 @@ public class GEServiceImpl implements GEService {
|
|
|
asnOrderDetailDTO.setAttr4(rsasnPack.getString("aspo_cgqty"));
|
|
|
asnOrderDetailDTO.setAttr5(rsasnPack.getString("aspo_grossload"));
|
|
|
asnOrderDetailDTO.setAttr6("KG");
|
|
|
- asnOrderDetailDTO.setAttr8(rs.getGeneralString("asd_invoice"));
|
|
|
+ asnOrderDetailDTO.setAttr7(rsasnPack.getGeneralString("aspo_weight"));
|
|
|
+ asnOrderDetailDTO.setAttr8(rsasnPack.getGeneralString("aspo_invoice"));
|
|
|
asnOrderDetailDTO.setAttr9(rsasnPack.getString("aspo_countryyc"));
|
|
|
+ asnOrderDetailDTO.setAttr19(rsasnPack.getString("aspo_bztype"));
|
|
|
|
|
|
//asnSNDetail
|
|
|
List<AsnSnDetailDTO> asnSnDetailDTOl = new ArrayList<AsnSnDetailDTO>();
|
|
|
@@ -389,7 +348,7 @@ public class GEServiceImpl implements GEService {
|
|
|
}else{
|
|
|
//无托箱 asnPack
|
|
|
SqlRowList rsasnPack = baseDao.queryForRowSet("select as_asnno,aspo_cgcode,aspo_cgdetno,aspo_bzway,aspo_packno,aspo_bzqty,aspo_grossload, " +
|
|
|
- "aspo_tall,aspo_wide,aspo_long,aspo_quantity,aspo_custpartno,aspo_cgqty,aspo_countryyc " +
|
|
|
+ "aspo_tall,aspo_wide,aspo_long,aspo_quantity,aspo_custpartno,aspo_cgqty,aspo_countryyc,aspo_bztype,aspo_weight,aspo_invoice " +
|
|
|
"from AsnShipment left join ASNSHIPMENTORDER on as_id = aspo_asid where as_id = ?",id);
|
|
|
List<AsnOrderDetailDTO> asnOrderDetailDTOl = new ArrayList<AsnOrderDetailDTO>();
|
|
|
while (rsasnPack.next()) {
|
|
|
@@ -405,8 +364,10 @@ public class GEServiceImpl implements GEService {
|
|
|
asnOrderDetailDTO.setAttr4(rsasnPack.getString("aspo_cgqty"));
|
|
|
asnOrderDetailDTO.setAttr5(rsasnPack.getString("aspo_grossload"));
|
|
|
asnOrderDetailDTO.setAttr6("KG");
|
|
|
- asnOrderDetailDTO.setAttr8(rs.getGeneralString("asd_invoice"));
|
|
|
+ asnOrderDetailDTO.setAttr7(rsasnPack.getGeneralString("aspo_weight"));
|
|
|
+ asnOrderDetailDTO.setAttr8(rsasnPack.getGeneralString("aspo_invoice"));
|
|
|
asnOrderDetailDTO.setAttr9(rsasnPack.getString("aspo_countryyc"));
|
|
|
+ asnOrderDetailDTO.setAttr19(rsasnPack.getString("aspo_bztype"));
|
|
|
|
|
|
//asnSNDetail
|
|
|
List<AsnSnDetailDTO> asnSnDetailDTOl = new ArrayList<AsnSnDetailDTO>();
|
|
|
@@ -436,7 +397,7 @@ public class GEServiceImpl implements GEService {
|
|
|
}
|
|
|
asnDetDTO.setASN(aAsnDTO);
|
|
|
resultResponse = HuToolUtils.post(asnUrl,asnDetDTO,headerMap);
|
|
|
- System.out.println("HttpUtils post 响应失败. url={"+asnUrl+"}, headerMap={"+headerMap+"}, response={"+asnDetDTO+"}");
|
|
|
+ //System.out.println("HttpUtils post 响应失败. url={"+asnUrl+"}, headerMap={"+headerMap+"}, response={"+asnDetDTO+"}");
|
|
|
logger.info("推送发货信息到歌尔,接口返回结果:{}",resultResponse);
|
|
|
return ApiResponse.successRsp("200", JSON.toJSONString(resultResponse));
|
|
|
}else{
|