|
|
@ -6,6 +6,7 @@ import com.dxhy.order.baseservice.module.base.service.BaseService; |
|
|
|
import com.dxhy.order.baseservice.module.buyer.protocol.MdmGmfxxtbMulticodeValuelistBO; |
|
|
|
import com.dxhy.order.baseservice.module.buyer.protocol.MdmGmfxxtbMulticodeValuelistBO; |
|
|
|
import com.dxhy.order.consumer.modules.buyer.domain.BuyerEntityExcel; |
|
|
|
import com.dxhy.order.consumer.modules.buyer.domain.BuyerEntityExcel; |
|
|
|
import com.dxhy.order.consumer.modules.buyer.domain.BuyerEntityYhItemExcel; |
|
|
|
import com.dxhy.order.consumer.modules.buyer.domain.BuyerEntityYhItemExcel; |
|
|
|
|
|
|
|
import com.dxhy.order.consumer.modules.buyer.domain.UserInfoExcel; |
|
|
|
import com.dxhy.order.consumer.modules.commodity.domain.dto.CommodityCodeEntityExcel; |
|
|
|
import com.dxhy.order.consumer.modules.commodity.domain.dto.CommodityCodeEntityExcel; |
|
|
|
import com.dxhy.order.consumer.modules.commodity.domain.dto.QueryGroupCommodityDTO; |
|
|
|
import com.dxhy.order.consumer.modules.commodity.domain.dto.QueryGroupCommodityDTO; |
|
|
|
import com.dxhy.order.consumer.modules.commodity.domain.dto.QuoteGroupCommodityDTO; |
|
|
|
import com.dxhy.order.consumer.modules.commodity.domain.dto.QuoteGroupCommodityDTO; |
|
|
@ -14,6 +15,7 @@ import com.dxhy.order.consumer.modules.commodity.service.IGroupCommodityCodeServ |
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmGmfxxtbMulticodeBO; |
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmGmfxxtbMulticodeBO; |
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmGmfxxtbReqBO; |
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmGmfxxtbReqBO; |
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmSyncGroupTaxCodeReqBO; |
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmSyncGroupTaxCodeReqBO; |
|
|
|
|
|
|
|
import com.dxhy.order.consumer.openapi.protocol.v6.sdenergy.MdmSyncUserReqBO; |
|
|
|
import com.dxhy.order.consumer.openapi.service.ISDEnregyService; |
|
|
|
import com.dxhy.order.consumer.openapi.service.ISDEnregyService; |
|
|
|
import com.dxhy.order.model.PageUtils; |
|
|
|
import com.dxhy.order.model.PageUtils; |
|
|
|
import com.dxhy.order.model.R; |
|
|
|
import com.dxhy.order.model.R; |
|
|
@ -102,6 +104,7 @@ public class GroupCommodityCodeController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/uploadBuyerInfo") |
|
|
|
@RequestMapping("/uploadBuyerInfo") |
|
|
|
public R uploadBuyerInfo(@RequestParam(value = "file") MultipartFile file) { |
|
|
|
public R uploadBuyerInfo(@RequestParam(value = "file") MultipartFile file) { |
|
|
|
try { |
|
|
|
try { |
|
|
@ -155,4 +158,33 @@ public class GroupCommodityCodeController { |
|
|
|
throw new RuntimeException(e); |
|
|
|
throw new RuntimeException(e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping("/uploadUserInfo") |
|
|
|
|
|
|
|
public R uploadUserInfo(@RequestParam(value = "file") MultipartFile file) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
List<UserInfoExcel> userInfoExcels = EasyExcel.read(file.getInputStream()).sheet(0).head(UserInfoExcel.class).headRowNumber(1).doReadSync(); |
|
|
|
|
|
|
|
log.info("解析的数据:{}", JSONObject.toJSONString(userInfoExcels)); |
|
|
|
|
|
|
|
if (userInfoExcels == null || userInfoExcels.isEmpty() ) { |
|
|
|
|
|
|
|
return R.error("数据解析失败"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
List<MdmSyncUserReqBO> reqBOList = Lists.newArrayList(); |
|
|
|
|
|
|
|
for (UserInfoExcel infoExcel : userInfoExcels) { |
|
|
|
|
|
|
|
MdmSyncUserReqBO userReqBO = new MdmSyncUserReqBO(); |
|
|
|
|
|
|
|
userReqBO.setCODE(infoExcel.getCODE()); |
|
|
|
|
|
|
|
userReqBO.setDESC1(infoExcel.getDESC1()); |
|
|
|
|
|
|
|
userReqBO.setDESC10(infoExcel.getDESC10()); |
|
|
|
|
|
|
|
userReqBO.setDESC11(infoExcel.getDESC11()); |
|
|
|
|
|
|
|
userReqBO.setDESC14(infoExcel.getDESC14()); |
|
|
|
|
|
|
|
userReqBO.setDESC37(infoExcel.getDESC37()); |
|
|
|
|
|
|
|
userReqBO.setDESC38(infoExcel.getDESC38()); |
|
|
|
|
|
|
|
userReqBO.setDESC59(infoExcel.getDESC59()); |
|
|
|
|
|
|
|
userReqBO.setUUID(baseService.getGenerateShotKey()); |
|
|
|
|
|
|
|
reqBOList.add(userReqBO); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
String str = sdEnregyService.syncMdmUserService(reqBOList); |
|
|
|
|
|
|
|
return R.ok().put("data",str); |
|
|
|
|
|
|
|
} catch (IOException e) { |
|
|
|
|
|
|
|
throw new RuntimeException(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|