| | |
| | | import com.java110.dto.log.AssetImportLogDetailDto; |
| | | import com.java110.dto.oweFeeCallable.OweFeeCallableDto; |
| | | import com.java110.dto.owner.OwnerDto; |
| | | import com.java110.dto.resource.ResourceStoreDto; |
| | | import com.java110.dto.room.RoomDto; |
| | | import com.java110.fee.dao.IApplyRoomDiscountServiceDao; |
| | | import com.java110.intf.community.ICommunityInnerServiceSMO; |
| | |
| | | import com.java110.intf.fee.IOweFeeCallableV1InnerServiceSMO; |
| | | import com.java110.intf.fee.IPayFeeV1InnerServiceSMO; |
| | | import com.java110.intf.store.IPurchaseApplyInnerServiceSMO; |
| | | import com.java110.intf.store.IResourceStoreInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerInnerServiceSMO; |
| | | import com.java110.intf.user.IOwnerV1InnerServiceSMO; |
| | | import com.java110.job.importData.DefaultImportData; |
| | |
| | | import com.java110.po.room.LitigationInfoPo; |
| | | import com.java110.po.room.PayeeReceiveInfoPo; |
| | | import com.java110.utils.util.BeanConvertUtil; |
| | | import com.java110.utils.util.DateUtil; |
| | | import org.mybatis.spring.SqlSessionTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private IPurchaseApplyInnerServiceSMO purchaseApplyInnerServiceSMOImpl; |
| | | |
| | | @Autowired |
| | | private IResourceStoreInnerServiceSMO resourceStoreInnerServiceSMOImpl; |
| | | |
| | | @Override |
| | | public void importData(List<AssetImportLogDetailDto> assetImportLogDetailDtos) { |
| | |
| | | PurchaseApplyPo purchaseApplyPo = new PurchaseApplyPo(); |
| | | purchaseApplyPo.setApplyDate(Vtil.defaultValue(os.get(2))); |
| | | purchaseApplyPo.setBId("-1"); |
| | | purchaseApplyPo.setStoreId(os.getString(179)); |
| | | purchaseApplyPo.setCreateUserId(os.getString(180)); |
| | | purchaseApplyPo.setCreateUserName(os.getString(181)); |
| | | purchaseApplyPo.setCommunityId(os.getString(182)); |
| | | purchaseApplyPo.setStoreId(os.getString(186)); |
| | | purchaseApplyPo.setCreateUserId(os.getString(187)); |
| | | purchaseApplyPo.setCreateUserName(os.getString(188)); |
| | | purchaseApplyPo.setCommunityId(os.getString(189)); |
| | | purchaseApplyPo.setDescription(""); |
| | | purchaseApplyPo.setResOrderType("10000"); |
| | | purchaseApplyPo.setWarehousingWay("20000"); |
| | |
| | | sqlSessionTemplate.insert("purchaseApplyItemServiceDaoImpl.savePurchaseApplyItemInfo", BeanConvertUtil.beanCovertMap(purchaseApplyItem)); |
| | | |
| | | List<PurchaseApplyAudit> purchaseApplyAudits = new ArrayList<>(); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | builderPurchaseApplyAudits(purchaseApplyAudits, purchaseApplyPo.getApplyOrderId(), os); |
| | | |
| | | for(PurchaseApplyAudit purchaseApplyAudit : purchaseApplyAudits){ |
| | |
| | | PurchaseApplyStock purchaseApplyStock = new PurchaseApplyStock(); |
| | | purchaseApplyStock.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | purchaseApplyStock.setApplyOrderId(purchaseApplyPo.getApplyOrderId()); |
| | | purchaseApplyStock.setPurchaseTimes(os.getString(44)); |
| | | purchaseApplyStock.setPurchaseQuantity(os.getString(45)); |
| | | purchaseApplyStock.setPurchasePrice(os.getString(46)); |
| | | purchaseApplyStock.setPurchaseAmount(os.getString(47)); |
| | | purchaseApplyStock.setTotalQuantityJohn(os.getString(48)); |
| | | purchaseApplyStock.setPayableAmountJohn(os.getString(49)); |
| | | purchaseApplyStock.setPaymentTimes(os.getString(51)); |
| | | purchaseApplyStock.setPaymentTotalAmount(os.getString(52)); |
| | | purchaseApplyStock.setUnpaidAmountJohn(os.getString(53)); |
| | | purchaseApplyStock.setUnhappenJohn(os.getString(54)); |
| | | purchaseApplyStock.setStockQuantity(os.getString(55)); |
| | | purchaseApplyStock.setUseQuantity(os.getString(56)); |
| | | purchaseApplyStock.setStockQuantity(os.getString(57)); |
| | | purchaseApplyStock.setPriceJohn(os.getString(58)); |
| | | purchaseApplyStock.setSurplusAmount(os.getString(59)); |
| | | purchaseApplyStock.setKeeperJohn(os.getString(60)); |
| | | purchaseApplyStock.setPurchaseTimes(os.getString(47)); |
| | | purchaseApplyStock.setPurchaseQuantity(os.getString(48)); |
| | | purchaseApplyStock.setPurchasePrice(os.getString(49)); |
| | | purchaseApplyStock.setPurchaseAmount(os.getString(50)); |
| | | purchaseApplyStock.setTotalQuantityJohn(os.getString(51)); |
| | | purchaseApplyStock.setPayableAmountJohn(os.getString(52)); |
| | | purchaseApplyStock.setPaymentTimes(os.getString(53)); |
| | | purchaseApplyStock.setPaymentTotalAmount(os.getString(54)); |
| | | purchaseApplyStock.setUnpaidAmountJohn(os.getString(55)); |
| | | purchaseApplyStock.setUnhappenJohn(os.getString(56)); |
| | | purchaseApplyStock.setStockQuantity(os.getString(58)); |
| | | purchaseApplyStock.setUseQuantity(os.getString(59)); |
| | | purchaseApplyStock.setStockQuantity(os.getString(60)); |
| | | purchaseApplyStock.setPriceJohn(os.getString(61)); |
| | | purchaseApplyStock.setSurplusAmount(os.getString(62)); |
| | | purchaseApplyStock.setKeeperJohn(os.getString(63)); |
| | | |
| | | sqlSessionTemplate.insert("purchaseApplyStockServiceDaoImpl.savePurchaseApplyStockInfo", BeanConvertUtil.beanCovertMap(purchaseApplyStock)); |
| | | |
| | | ResourceStorePo resourceStorePo = new ResourceStorePo(); |
| | | ResourceStoreDto resourceStoreDto = new ResourceStoreDto(); |
| | | |
| | | // resourceStorePo.setResId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_resId)); |
| | | // resourceStorePo.setStoreId(os.getString(179)); |
| | | // resourceStorePo.set |
| | | // resourceStorePo.setCommunityId(os.getString(182)); |
| | | resourceStoreDto.setResId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_resId)); |
| | | resourceStoreDto.setStoreId(os.getString(186)); |
| | | resourceStoreDto.setResName(os.getString(15)); |
| | | resourceStoreDto.setResCode("00"); |
| | | resourceStoreDto.setPrice(Vtil.defaultValue(os.getString(18), "0")); |
| | | resourceStoreDto.setCommunityId(os.getString(189)); |
| | | resourceStoreDto.setTripleWaybillNo(os.getString(10)); |
| | | resourceStoreDto.setModel(os.getString(16)); |
| | | resourceStoreDto.setStock(os.getString(23)); |
| | | resourceStoreDto.setIsFixed("N"); |
| | | resourceStoreDto.setUnitCode(Vtil.defaultValue(os.getString(17), "空")); |
| | | resourceStoreDto.setCreateTime(new Date()); |
| | | |
| | | resourceStoreInnerServiceSMOImpl.saveResourceStore(resourceStoreDto); |
| | | |
| | | List<PurchaseApplyDetailPo> purchaseApplyDetailPos = new ArrayList<>(); |
| | | builderPurchaseApplyDetailPos(purchaseApplyDetailPos, purchaseApplyPo.getApplyOrderId(), os); |
| | | builderPurchaseApplyDetailPos(purchaseApplyDetailPos, purchaseApplyPo.getApplyOrderId(), os, resourceStoreDto.getResId()); |
| | | |
| | | purchaseApplyPo.setPurchaseApplyDetailPos(purchaseApplyDetailPos); |
| | | purchaseApplyInnerServiceSMOImpl.savePurchaseApply(purchaseApplyPo); |
| | |
| | | PurchaseReceive purchaseReceive = new PurchaseReceive(); |
| | | purchaseReceive.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | purchaseReceive.setApplyOrderId(purchaseApplyPo.getApplyOrderId()); |
| | | purchaseReceive.setReceiveQuantity(os.getString(157)); |
| | | purchaseReceive.setReceiveDate(os.getString(158)); |
| | | purchaseReceive.setReceiveAddress(os.getString(159)); |
| | | purchaseReceive.setSigner(os.getString(160)); |
| | | purchaseReceive.setStockInNo(os.getString(161)); |
| | | purchaseReceive.setStockInDate(os.getString(162)); |
| | | purchaseReceive.setStockOutNo(os.getString(163)); |
| | | purchaseReceive.setStockOutDate(os.getString(164)); |
| | | purchaseReceive.setReceiveQuantity(os.getString(161)); |
| | | purchaseReceive.setReceiveDate(os.getString(162)); |
| | | purchaseReceive.setReceiveAddress(os.getString(163)); |
| | | purchaseReceive.setSigner(os.getString(164)); |
| | | purchaseReceive.setStockInNo(os.getString(165)); |
| | | purchaseReceive.setStockInDate(os.getString(166)); |
| | | purchaseReceive.setStockOutNo(os.getString(167)); |
| | | purchaseReceive.setStockOutDate(os.getString(168)); |
| | | |
| | | sqlSessionTemplate.insert("purchaseReceiveServiceDaoImpl.savePurchaseReceiveInfo", BeanConvertUtil.beanCovertMap(purchaseReceive)); |
| | | |
| | | PurchaseReturnRecord purchaseReturnRecord = new PurchaseReturnRecord(); |
| | | purchaseReturnRecord.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | purchaseReturnRecord.setOrderId(purchaseApplyPo.getApplyOrderId()); |
| | | purchaseReturnRecord.setReturnDate(os.getString(165)); |
| | | purchaseReturnRecord.setReturnQuantity(os.getString(166)); |
| | | purchaseReturnRecord.setReturnPerson(os.getString(167)); |
| | | purchaseReturnRecord.setApprover(os.getString(168)); |
| | | purchaseReturnRecord.setReturnPrice(os.getString(169)); |
| | | purchaseReturnRecord.setReturnTotalPrice(os.getString(170)); |
| | | purchaseReturnRecord.setSupplierName(os.getString(171)); |
| | | purchaseReturnRecord.setReturnStockInNo(os.getString(172)); |
| | | purchaseReturnRecord.setReturnStockInDate(os.getString(173)); |
| | | purchaseReturnRecord.setReturnStockOutNo(os.getString(174)); |
| | | purchaseReturnRecord.setReturnDirection(os.getString(175)); |
| | | purchaseReturnRecord.setReturnDate(os.getString(168)); |
| | | purchaseReturnRecord.setReturnQuantity(os.getString(169)); |
| | | purchaseReturnRecord.setReturnPerson(os.getString(170)); |
| | | purchaseReturnRecord.setApprover(os.getString(171)); |
| | | purchaseReturnRecord.setReturnPrice(os.getString(172)); |
| | | purchaseReturnRecord.setReturnTotalPrice(os.getString(173)); |
| | | purchaseReturnRecord.setSupplierName(os.getString(174)); |
| | | purchaseReturnRecord.setReturnStockInNo(os.getString(175)); |
| | | purchaseReturnRecord.setReturnStockInDate(os.getString(176)); |
| | | purchaseReturnRecord.setReturnStockOutNo(os.getString(177)); |
| | | purchaseReturnRecord.setReturnDirection(os.getString(178)); |
| | | |
| | | sqlSessionTemplate.insert("purchaseReturnRecordServiceDaoImpl.insertPurchaseReturnRecord", BeanConvertUtil.beanCovertMap(purchaseReturnRecord)); |
| | | |
| | |
| | | } |
| | | |
| | | private void builderPurchasePayment(List<PurchasePayment> purchasePayments, String applyOrderId, JSONArray os) { |
| | | for (int i = 97; i <= 97 + 12 * 4; i += 12) { |
| | | for (int i = 100; i <= 100 + 12 * 4; i += 12) { |
| | | PurchasePayment purchasePayment = new PurchasePayment(); |
| | | purchasePayment.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | purchasePayment.setApplyOrderId(applyOrderId); |
| | |
| | | } |
| | | } |
| | | |
| | | private void builderPurchaseApplyDetailPos(List<PurchaseApplyDetailPo> purchaseApplyAudits, String applyOrderId, JSONArray os) { |
| | | for (int i = 61; i <= 61 + 9 * 4; i += 9) { |
| | | private void builderPurchaseApplyDetailPos(List<PurchaseApplyDetailPo> purchaseApplyAudits, String applyOrderId, JSONArray os, String resId) { |
| | | for (int i = 64; i <= 64 + 9 * 4; i += 9) { |
| | | PurchaseApplyDetailPo purchaseApplyDetailPo = new PurchaseApplyDetailPo(); |
| | | purchaseApplyDetailPo.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | purchaseApplyDetailPo.setApplyOrderId(applyOrderId); |
| | | purchaseApplyDetailPo.setResId(os.getString(15));//TODO 添加物品 |
| | | purchaseApplyDetailPo.setResId(resId);//TODO 添加物品 |
| | | purchaseApplyDetailPo.setPurchaseDate(os.getString(i)); |
| | | purchaseApplyDetailPo.setQuantity(os.getString(i + 1)); |
| | | purchaseApplyDetailPo.setPrice(os.getString(i + 2)); |
| | |
| | | purchaseApplyAudit.setModel(os.getString(30)); |
| | | purchaseApplyAudit.setAuditDept(os.getString(31)); |
| | | purchaseApplyAudit.setAuditor(os.getString(32)); |
| | | purchaseApplyAudit.setAuditEndTime(os.getString(33)); |
| | | purchaseApplyAudits.add(purchaseApplyAudit); |
| | | } |
| | | |
| | |
| | | purchaseApplyAudit.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | purchaseApplyAudit.setAuditType("财务部审核"); |
| | | purchaseApplyAudit.setApplyOrderId(applyOrderId); |
| | | purchaseApplyAudit.setAuditDate(os.getString(33)); |
| | | purchaseApplyAudit.setOperator(os.getString(34)); |
| | | purchaseApplyAudit.setAuditDate(os.getString(35)); |
| | | purchaseApplyAudit.setAuditDept(os.getString(36)); |
| | | purchaseApplyAudit.setAuditor(os.getString(37)); |
| | | purchaseApplyAudit.setAuditOpinion(os.getString(38)); |
| | | purchaseApplyAudit.setRemark(os.getString(39)); |
| | | purchaseApplyAudit.setAuditDate(os.getString(34)); |
| | | purchaseApplyAudit.setOperator(os.getString(35)); |
| | | purchaseApplyAudit.setAuditDate(os.getString(36)); |
| | | purchaseApplyAudit.setAuditDept(os.getString(37)); |
| | | purchaseApplyAudit.setAuditor(os.getString(38)); |
| | | purchaseApplyAudit.setAuditOpinion(os.getString(39)); |
| | | purchaseApplyAudit.setRemark(os.getString(40)); |
| | | purchaseApplyAudit.setAuditEndTime(os.getString(41)); |
| | | purchaseApplyAudits.add(purchaseApplyAudit); |
| | | } |
| | | |
| | |
| | | purchaseApplyAudit.setId(GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_orderId)); |
| | | purchaseApplyAudit.setAuditType("领导审核"); |
| | | purchaseApplyAudit.setApplyOrderId(applyOrderId); |
| | | purchaseApplyAudit.setAuditDate(os.getString(40)); |
| | | purchaseApplyAudit.setOperator(os.getString(41)); |
| | | purchaseApplyAudit.setAuditor(os.getString(42)); |
| | | purchaseApplyAudit.setRemark(os.getString(43)); |
| | | purchaseApplyAudit.setAuditDate(os.getString(42)); |
| | | purchaseApplyAudit.setOperator(os.getString(43)); |
| | | purchaseApplyAudit.setAuditor(os.getString(44)); |
| | | purchaseApplyAudit.setRemark(os.getString(45)); |
| | | purchaseApplyAudit.setAuditEndTime(os.getString(46)); |
| | | purchaseApplyAudits.add(purchaseApplyAudit); |
| | | } |
| | | } |