|
@@ -31,6 +31,7 @@ import org.apache.http.client.methods.HttpPost;
|
|
import org.apache.http.impl.client.DefaultHttpClient;
|
|
import org.apache.http.impl.client.DefaultHttpClient;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
|
+import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.io.UnsupportedEncodingException;
|
|
import java.lang.reflect.Field;
|
|
import java.lang.reflect.Field;
|
|
@@ -1559,4 +1560,84 @@ public class DyoaHistoryServiceImpl implements IDyoaHistoryService{
|
|
// }
|
|
// }
|
|
// return null;
|
|
// return null;
|
|
// }
|
|
// }
|
|
|
|
+
|
|
|
|
+ @Autowired
|
|
|
|
+ private OrderFundMapper orderFundMapper;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Boolean updateMajorProduction() {
|
|
|
|
+ List<HisMajorProduction> allProductionNo = dyoaHistoryMapper.findAllProductionNo();
|
|
|
|
+ for (HisMajorProduction productionNo : allProductionNo){
|
|
|
|
+ List<MajorProduction> list = majorProductionService.list(new LambdaQueryWrapper<MajorProduction>().select(BaseEntity::getId).eq(MajorProduction::getReportNo, productionNo.getReportNo()));
|
|
|
|
+ if (CollectionUtil.isEmpty(list)){
|
|
|
|
+ DyoaRecord record = dyoaRecordService.getOne(new LambdaQueryWrapper<DyoaRecord>().eq(DyoaRecord::getDyoaId, productionNo.getId()).eq(DyoaRecord::getMbsType, "MAJOR_ORDER"));
|
|
|
|
+ if (record != null){
|
|
|
|
+ MajorProduction majorProduction = new MajorProduction();
|
|
|
|
+ majorProduction.setReportNo(productionNo.getReportNo());
|
|
|
|
+ majorProduction.setMajorId(record.getMbsId());
|
|
|
|
+ if (StrUtil.isNotBlank(productionNo.getPType())){
|
|
|
|
+ majorProduction.setProduction(getProductionType(productionNo.getPType()));
|
|
|
|
+ }else {
|
|
|
|
+ majorProduction.setProduction("REPORT");
|
|
|
|
+ }
|
|
|
|
+ majorProduction.setName(productionNo.getName());
|
|
|
|
+ majorProduction.setClientName(productionNo.getPrincipal());
|
|
|
|
+ majorProduction.setClientTel(productionNo.getPrincipalMobile());
|
|
|
|
+ majorProduction.setClientAddress(productionNo.getPrincipalAddress());
|
|
|
|
+ if (productionNo.getPriceDate()!=null){
|
|
|
|
+ majorProduction.setValueTiming(DateUtils.dateToLocalDate(productionNo.getPriceDate()));
|
|
|
|
+ }
|
|
|
|
+ majorProduction.setEvaluateAcreage(productionNo.getArea());
|
|
|
|
+ majorProduction.setEvaluateAmount(productionNo.getMoney());
|
|
|
|
+ majorProduction.setEvaluatePrice(productionNo.getXPrice());
|
|
|
|
+ majorProduction.setRepertoryInTime(productionNo.getBgInTime());
|
|
|
|
+ majorProduction.setRepertoryOutTime(productionNo.getBgOutTime());
|
|
|
|
+ majorProduction.setDelivery(productionNo.getDeliveryState());
|
|
|
|
+ if (productionNo.getConfirmTime()!=null){
|
|
|
|
+ majorProduction.setDeliveryDate(DateUtils.dateToLocalDate(productionNo.getConfirmTime()));
|
|
|
|
+ }
|
|
|
|
+ if (productionNo.getArchiveTime()!=null){
|
|
|
|
+ majorProduction.setSaveFileDate(DateUtils.dateToLocalDate(productionNo.getArchiveTime()));
|
|
|
|
+ }
|
|
|
|
+ majorProduction.setStandardAmount(productionNo.getStandardPrice());
|
|
|
|
+ majorProductionService.save(majorProduction);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Boolean updateProductionFund() {
|
|
|
|
+ List<OrderFund> orderFunds = orderFundService.getAllOrderFund();
|
|
|
|
+ for (OrderFund orderFund : orderFunds) {
|
|
|
|
+ List<ProductionFund> list = productionFundService.list(new LambdaQueryWrapper<ProductionFund>().eq(ProductionFund::getOrderFundId, orderFund.getId()));
|
|
|
|
+ if (list.size()==0){
|
|
|
|
+ ProductionFund pf = new ProductionFund();
|
|
|
|
+ pf.setOrderFundId(orderFund.getId());
|
|
|
|
+ pf.setBusinessType(MainBusinessEnum.MAJOR_BUSINESS.name());
|
|
|
|
+ pf.setBusinessId(orderFund.getBusinessId());
|
|
|
|
+ pf.setRealAmount(orderFund.getRealAmount());
|
|
|
|
+ pf.setProductionShouldAmount(orderFund.getShouldAmount());
|
|
|
|
+ pf.setBusinessId(orderFund.getBusinessId());
|
|
|
|
+ pf.setStandardAmount(orderFund.getStandardAmount());
|
|
|
|
+ pf.setProductionNo(orderFund.getReportNo());
|
|
|
|
+ pf.setCreated(orderFund.getCreated());
|
|
|
|
+ productionFundService.save(pf);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public Boolean updateClaimProductionId() {
|
|
|
|
+ List<HisClaimProd> list = financeClaimService.updateClaimProductionId();
|
|
|
|
+ for (HisClaimProd hisClaimProd : list){
|
|
|
|
+ financeClaimService.update(new LambdaUpdateWrapper<FinanceClaim>().eq(BaseEntity::getId,hisClaimProd.getFcid()).set(FinanceClaim::getProductionFundId,hisClaimProd.getPid()));
|
|
|
|
+ }
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|